Open SilentFlame opened 7 years ago
I ran both cases with sopex, sopex "Ram and Shyam are good boys." Shyam --[are]--> boys
sopex "Shyam and Ram are good boys." Ram --[are]--> boys
and when the condition triplets[j].subject == target.subject is used, second case is rejected. This is a drawback of sopex that it doesn't recognise multiple subjects and I think it would be better to do away with sopex and use nltk for the same purpose.
Was thinking of something similar.
Please suggest the way you are thinking to move from here.
Spacy can be used for the purpose. I ran the following code: https://gist.github.com/sarthak5/46baf7e2e7ce60fbc4a087856b8756f1 If given input : Ram and Shyam are walking and playing football and cricket. it will separate into three lists subjects,verbs,objects as [Ram, Shyam] [walking, playing] [football, cricket] sets of subjects,objects or verbs of sentences can be compared to check for a fact.
To see this run the script and see that there is a sentence where there are two subjects.
Ram and Shyam
. When we give a fact concerned withRam
, It says fact is False no matter whether it's true or not. but when we give the same fact with subject asShyam
it works fine.handle the cases when it considers both the subjects for checking the fact not only the latter subject.