We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11f670f commit 6b0db17Copy full SHA for 6b0db17
functions/handlers.js
@@ -30,7 +30,7 @@ async function handleVERB(obj, sentence, langRef, src, defaults, forces){
30
obj.meta.PERSON = defaults.PERSON;
31
32
const childrenSUBJ = obj.children.filter(c => c.type === 'SUBJ' || c.type === 'NOUN') //HERE: check if include NOUN here is ok
33
- if (forces.PERSON){
+ if (forces.PERSON && childrenSUBJ.every(c => !sentence[c.position].words.includes(forces.PERSON))){
34
obj.meta.PERSON = forces.PERSON;
35
} else if (childrenSUBJ.length > 1) {
36
const childrenSUBJpersons = childrenSUBJ.map(c => sentence[c.position].meta.PERSON)
0 commit comments