예제 #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();
		}
예제 #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();
 }
예제 #3
0
파일: SUMO.cs 프로젝트: TRYGISER/sumo.net
            /// <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);
            }
예제 #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");
            }
        }
예제 #5
0
파일: MainForm.cs 프로젝트: maherg/sumo.net
		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";
			}
		}
예제 #6
0
파일: SUMO.cs 프로젝트: maherg/sumo.net
 /// <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;
 }
예제 #7
0
파일: SUMO.cs 프로젝트: maherg/sumo.net
 /// <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);
 }
예제 #8
0
파일: SUMO.cs 프로젝트: TRYGISER/sumo.net
 /// <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));
 }