edu.mit.jmwe.util
Class JWIPOS

java.lang.Object
  extended by edu.mit.jmwe.util.JWIPOS

public class JWIPOS
extends Object

Utility class used to translate part of speech tags into JWI POS objects as well as translate between jMWE, JWI and jSemcor part of speech objects. This class requires the JWI and JSemcor libraries to be on the classpath.

Since:
jMWE 1.0.0
Version:
$Id: JWIPOS.java 620 2011-05-08 21:13:58Z markaf $
Author:
M.A. Finlayson

Constructor Summary
JWIPOS()
           
 
Method Summary
static MWEPOS toMWEPOS(edu.mit.jwi.item.POS pos)
          Translates a JWI POS object into a jMWE MWEPOS object.
static edu.mit.jwi.item.POS toPOS(edu.mit.jsemcor.term.IPOSTag tag)
          Translates a JSemcor IPOSTag object into a JWI POS object.
static edu.mit.jwi.item.POS toPOS(MWEPOS pos)
          Translates a jMWE MWEPOS object into a JWI POS object.
static edu.mit.jwi.item.POS toPOS(String tag)
          Translates a pos tag into a JWI POS object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWIPOS

public JWIPOS()
Method Detail

toMWEPOS

public static MWEPOS toMWEPOS(edu.mit.jwi.item.POS pos)
Translates a JWI POS object into a jMWE MWEPOS object.

Parameters:
pos - the JWI part of speech to be translated
Returns:
the jMWE MWEPOS object that is the equivalent of
Throws:
NullPointerException - if the specified part of speech is null
IllegalArgumentException - if the specified part of speech is unknown
Since:
jMWE 1.0.0

toPOS

public static edu.mit.jwi.item.POS toPOS(MWEPOS pos)
Translates a jMWE MWEPOS object into a JWI POS object.

Parameters:
pos - the jMWE part of speech to be translated
Returns:
the JWI POS object that is the equivalent, null if the part of speech is unknown.
Throws:
NullPointerException - if the specified part of speech is null
Since:
jMWE 1.0.0

toPOS

public static edu.mit.jwi.item.POS toPOS(edu.mit.jsemcor.term.IPOSTag tag)
Translates a JSemcor IPOSTag object into a JWI POS object.

Parameters:
tag - the jSemcor part of speech tag to be translated
Returns:
the JWI POS object that is the equivalent, null if the part of speech is unknown.
Throws:
NullPointerException - if the specified part of speech is null
Since:
jMWE 1.0.0

toPOS

public static edu.mit.jwi.item.POS toPOS(String tag)
Translates a pos tag into a JWI POS object.

Parameters:
tag - the part of speech tag to be translated
Returns:
the JWI POS object that is the equivalent, null if the part of speech is unknown.
Throws:
NullPointerException - if the specified part of speech is null
Since:
jMWE 1.0.0


Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.