Esempio n. 1
0
		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();
		}
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
            /// <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);
            }
Esempio n. 4
0
        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");
            }
        }
Esempio n. 5
0
		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";
			}
		}
Esempio n. 6
0
 /// <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;
 }
Esempio n. 7
0
 /// <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);
 }
Esempio n. 8
0
 /// <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));
 }