word's base form

Help
jlp345
2006-06-22
2013-04-29
  • jlp345

    jlp345 - 2006-06-22

      I am using jwnl for my project about ontology.There are some toubles .
      First  I want to get all words' base form,(btw:word which is from a text file is an String type ).
      The second ,I want to get all words from wordnet 2.0.How should i do?
    Thanks in advance.

     
    • Ralph Vince

      Ralph Vince - 2006-07-01

      I believe you get the base of a word, as you are looking for it as:

      IndexWord indexWord = (Dictionary.getInstance().lookupIndexWord(p,s));
      //where p is the POS of the word you are looking up and s is a string for the word, e.g.:
      IndexWord indexWord = (Dictionary.getInstance().lookupIndexWord(POS.VERB,"painting"));
                  String yourword=indexWord.getLemma();

      Note the reason you must specify the POS as in this case, you are speaking of the verb painting, versus the noun of the same word! -Ralph Vince

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks