public Verb(VerbType _type, int _valency, SentenceConstruction _constructions, float _factor) { type = _type; valency = _valency; constructions = _constructions; factor = _factor; }
public static Dictionary <WordFunction, List <Word> > Structure(this Sentence _sentence) { Dictionary <WordFunction, List <Word> > result = new Dictionary <WordFunction, List <Word> >(); SentenceConstruction construction = _sentence.Construction(); result.Add(WordFunction.Subject, new List <Word>()); result.Add(WordFunction.Action, new List <Word>()); result.Add(WordFunction.Object, new List <Word>()); //result.Add(WordFunction.Complement, new List<Word>()); bool verbPassed = false; if (construction != SentenceConstruction.E && construction != SentenceConstruction.O) { for (int i = 0; i < _sentence.size; i++) { Word word = _sentence.words[i]; if (word.IsWord()) { if (word.Nature(WordNature.Verb) && !verbPassed) { verbPassed = true; result[WordFunction.Action].Add(word); } else if (!verbPassed) { result[WordFunction.Subject].Add(word); } else { result[WordFunction.Object].Add(word); } } } } else if (construction == SentenceConstruction.O) { } return(result); }