public WordCollection(Synset synset, SpeechTypes type) { _synset = synset; _words = (java.util.ArrayList)SUMO.WordNet.Intern.synsetsToWords.get((int)type + _synset.ID); if(_words == null) _words = new java.util.ArrayList(); _it = _words.iterator(); }
public WordCollection(Synset synset, SpeechTypes type) { _synset = synset; _words = (java.util.ArrayList)SUMO.WordNet.Intern.synsetsToWords.get((int)type + _synset.ID); if (_words == null) { _words = new java.util.ArrayList(); } _it = _words.iterator(); }
/// <summary> /// Determine the mapped SUMO term for this word /// </summary> /// <param name="word">Input word</param> /// <param name="type">Word type</param> public static string GetSUMOTerm(string word, SpeechTypes type) { string term = _wn.getSUMOterm(word, (int)type); if (term == "") { return(null); } return(term); }
string PosToString(SpeechTypes pos) { switch (pos) { case SpeechTypes.Noun: return("Noun"); case SpeechTypes.Verb: return("Verb"); case SpeechTypes.Adjective: return("Adjective"); case SpeechTypes.Adverb: return("Adverb"); default: return("Unknown"); } }
string PosToString(SpeechTypes pos) { switch(pos) { case SpeechTypes.Noun: return "Noun"; case SpeechTypes.Verb: return "Verb"; case SpeechTypes.Adjective: return "Adjective"; case SpeechTypes.Adverb: return "Adverb"; default: return "Unknown"; } }
/// <summary> /// Determine the mapped SUMO term for this word /// </summary> /// <param name="word">Input word</param> /// <param name="type">Word type</param> public static string GetSUMOTerm(string word, SpeechTypes type) { string term = _wn.getSUMOterm(word, (int)type); if(term == "") return null; return term; }
/// <summary> /// Determine wether a word of a specific type exists in WordNet /// </summary> /// <param name="word">The word text</param> /// <param name="type">Type of word (Noun, Verb, ...etc.)</param> /// <returns>True if it exists, False if not</returns> public static bool Contains(string word, SpeechTypes type) { return _wn.containsWord(word, (int)type); }
/// <summary> /// Determine wether a word of a specific type exists in WordNet /// </summary> /// <param name="word">The word text</param> /// <param name="type">Type of word (Noun, Verb, ...etc.)</param> /// <returns>True if it exists, False if not</returns> public static bool Contains(string word, SpeechTypes type) { return(_wn.containsWord(word, (int)type)); }