In my assignment, here I use SharpNLP to define part of speech, like noun, adjective, verb and so on. Then, i wanna classify sentence based on kind of tenses, firstly in this case, PAST TENSE as example.
Let see my code..
listSentence = ParseInput(allInput);
foreach (string word in listSentence[0].Split(separator))
if (word.Trim() != "")
listWord.Add(word);
string[] lWord = listWord.ToArray();
string[] lPOS = this.NLP.PosTagTokens(lWord);
allInput = "I was busy yesterday."
Takes it simple, in listSentence[0] contains "I was busy yesterday".
Then split into "I", "was", "busy", "yesterday" in string[] lWord
Then I used SharpNLP, that's running well so that string[] lPOS contains {"NN", "VBD", "JJ", "NN"}
That should be recognized as TRUE
Based on that output, I'm confused how to recognize as PAST TENSE - TRUE or FALSE.
Explanation :
NN : Noun, singular or mass
VBD : Verb, past tense
VBP : Verb, non-3rd person singular present
VBZ : Verb, 3rd person singular present
VBG : Verb, gerund or present participle
VBN : Verb, past participle
JJ : Adjective
PRP : Personal Pronoun
If allInput = "I am busy yesterday"
string[] lPOS = {"PRP", "VBP", "JJ", "NN"}
That should be recognized as FALSE
If allInput = "They am busy yesterday"
string[] lPOS = {"PRP", "VBP", "JJ", "NN"}
That should be recognized as FALSE
If allInput = "I was busy tomorrow"
string[] lPOS = {"PRP", "VBD", "JJ", "NN"}
That should be recognized as FALSE
Sir, please help me. Give me idea, and rules to recognize past tense based on all output above. Let me learn by your example. Thanks a lot all. :) :)