Package org.sf.mustru.test

Source Code of org.sf.mustru.test.TestWordnetTools

package org.sf.mustru.test;

import junit.framework.TestCase;

import org.apache.log4j.PropertyConfigurator;
import org.sf.mustru.utils.Constants;
import org.sf.mustru.utils.WordnetTools;

public class TestWordnetTools extends TestCase
{

/**
  * Test Wordnet synonyms
  */
  public void testSynonyms()
  {
   System.out.println("Started testing for wordnet synonyms");
   WordnetTools wnetTools = new WordnetTools();
   String word = "vietnamese"; String pos = "n"; String synonyms = wnetTools.getSynonyms(word, pos);
   System.out.println("Synonyms of " + word + " are -->" + synonyms);
   word = "track down"; pos = "v"; synonyms = wnetTools.getSynonyms(word, pos);
   System.out.println("Synonyms of " + word + " are -->" + synonyms);
   System.out.println("Finished testing for wordnet synonyms");
  }

 
  protected void setUp()
  { PropertyConfigurator.configure (Constants.LOG4J_FILE)}
}
TOP

Related Classes of org.sf.mustru.test.TestWordnetTools

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.