ws.wordnet
Class WordNet

java.lang.Object
  extended byws.wordnet.WordNet

public class WordNet
extends java.lang.Object

This class contains the methods for accessing the WordNet-database and writing the output in the "WordNet"-pane of the GUI.

The implementation of this class is support by JWord ( javadoc ), for more information please see also WordNet.

Author:
Sinian Zhang
See Also:
GuiGeneration.getOutputPanel(), UpdateOutputPanel.WnOutput(String, String, boolean)

Constructor Summary
WordNet()
           
 
Method Summary
static void getWnOutput(java.lang.String query)
          This method gets the access to WordNet-database, looks up the word(the query delivered by "Word"-inputfield), if found, writes the entries (including sense description, semantic relations, etc.) in the "WordNet"-pane of the GUI.
private static boolean queryInDescription(java.lang.String description, java.lang.String query)
          Checks, wheather a description for a word-sense contains the word itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordNet

public WordNet()
Method Detail

getWnOutput

public static void getWnOutput(java.lang.String query)
                        throws java.io.IOException,
                               javax.swing.text.BadLocationException
This method gets the access to WordNet-database, looks up the word(the query delivered by "Word"-inputfield), if found, writes the entries (including sense description, semantic relations, etc.) in the "WordNet"-pane of the GUI.

Parameters:
query - The word to be looked up, the word is delievered by "Word"-inputfield.
Throws:
java.io.IOException
javax.swing.text.BadLocationException
See Also:
UpdateOutputPanel.WnOutput(String, String, boolean), UpdateOutputPanel.HighlightWnOutput(JTextArea, String, String)

queryInDescription

private static boolean queryInDescription(java.lang.String description,
                                          java.lang.String query)
Checks, wheather a description for a word-sense contains the word itself.

Parameters:
description - The description for a sense, a word could have several senses.
query - The word to be looked up, the word is delievered by "Word"-inputfield.
Returns:
true or false.