public IEnumerable<Term> FindTermsByPOS(POS pos) { var result = from term in terms.Values where term.PoS == pos select term; return result; }
public override bool Equals(object obj) { bool equal = false; if (obj is POS) { POS other = (POS)obj; equal = _self == other.Value; } return(equal); }
protected override SynSet SelectSynset(string word, POS pos) { SynSet result = base.SelectSynset(word, pos); // temporary WordNetEngine.POS wordnetPos = pos.ForWordnet(); if (wordnetPos != WordNetEngine.POS.None) { IGlossaryEntry glossEntry = glossary.FindWord(word); if (glossEntry == null) { Set<SynSet> synsets = wordnet.GetSynSets(word, wordnetPos); foreach (SynSet synset in synsets) { // great algorythms will be added here } } else { result = glossEntry.Synset; } } return result; }
protected virtual SynSet SelectSynset(string word, POS pos) { WordNetEngine.POS wordnetPOS = pos.ForWordnet(); return (wordnetPOS == WordNetEngine.POS.None) ? null : wordnet.GetMostCommonSynSet(word, wordnetPOS); }