ca.site.elkb
Class Morphy

java.lang.Object
  extended by ca.site.elkb.Morphy
All Implemented Interfaces:
java.io.Serializable

public class Morphy
extends java.lang.Object
implements java.io.Serializable

Performs morphological transformations using the same rules as WordNet.

The following suffix substitutions are done for:

The noun.exc, adj.exc, verb.exc and adv.exc exception files, located in the $HOME/roget_elkb directory, are searched before applying the rules of detachment.

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy
See Also:
Serialized Form

Field Summary
static java.lang.String ADJ_EXC
          Location of the adj.exc file.
static java.lang.String ADV_EXC
          Location of the adv.exc file.
static java.lang.String ELKB_PATH
          Location of the ELKB data directory.
static java.lang.String NOUN_EXC
          Location of the noun.exc file.
static java.lang.String USER_HOME
          Location of user's Home directory.
static java.lang.String VERB_EXC
          Location of the verb.exc file.
 
Constructor Summary
Morphy()
          Default constructor.
 
Method Summary
 java.util.HashSet<java.lang.String> getBaseForm(java.lang.String words)
          Reruns all the base forms for a given word.
static void main(java.lang.String[] args)
          Allows the Morphy class to be used via the command line.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_HOME

public static final java.lang.String USER_HOME
Location of user's Home directory.


ELKB_PATH

public static final java.lang.String ELKB_PATH
Location of the ELKB data directory.


NOUN_EXC

public static final java.lang.String NOUN_EXC
Location of the noun.exc file.


VERB_EXC

public static final java.lang.String VERB_EXC
Location of the verb.exc file.


ADJ_EXC

public static final java.lang.String ADJ_EXC
Location of the adj.exc file.


ADV_EXC

public static final java.lang.String ADV_EXC
Location of the adv.exc file.

Constructor Detail

Morphy

public Morphy()
Default constructor.

Method Detail

main

public static void main(java.lang.String[] args)
Allows the Morphy class to be used via the command line. All the possible results of the input string are returned.

Usage: java Morphy

Parameters:
args -

getBaseForm

public java.util.HashSet<java.lang.String> getBaseForm(java.lang.String words)
Reruns all the base forms for a given word. Returns an empty HashSet if no base forms were found.

Parameters:
words -
Returns:
Set of base forms of a word