Exemplo n.º 1
0
 public IEnumerable<Term> FindTermsByPOS(POS pos)
 {
     var result = from term in terms.Values
                  where term.PoS == pos
                  select term;
     return result;
 }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            bool equal = false;

            if (obj is POS)
            {
                POS other = (POS)obj;
                equal = _self == other.Value;
            }
            return(equal);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 protected virtual SynSet SelectSynset(string word, POS pos)
 {
     WordNetEngine.POS wordnetPOS = pos.ForWordnet();
     return (wordnetPOS == WordNetEngine.POS.None) ? null : wordnet.GetMostCommonSynSet(word, wordnetPOS);
 }