edu.mit.jmwe.data
Enum MWEPOS

java.lang.Object
  extended by java.lang.Enum<MWEPOS>
      extended by edu.mit.jmwe.data.MWEPOS
All Implemented Interfaces:
Serializable, Comparable<MWEPOS>

public enum MWEPOS
extends Enum<MWEPOS>

Represents the part of speech of a multi-word expression.

Since:
jMWE 1.0.0
Version:
$Id: MWEPOS.java 580 2011-05-05 19:54:11Z markaf $
Author:
Nidhi Kulkarni, M.A. Finlayson

Enum Constant Summary
ADJECTIVE
           
ADVERB
           
NOUN
           
OTHER
           
PROPER_NOUN
           
VERB
           
 
Method Summary
static MWEPOS fromChar(char identifier)
          This convenience method allows retrieval of the MWEPOS object given the part of speech character.
 char getIdentifier()
          Returns the character identifier for the part-of-speech.
 Set<String> getPrefixes()
          Returns the set of prefixes for the part-of-speech.
static MWEPOS toMWEPOS(String tag)
          This convenience method allows retrieval of the MWEPOS object given the part of speech tag as a String.
static MWEPOS valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MWEPOS[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADJECTIVE

public static final MWEPOS ADJECTIVE

NOUN

public static final MWEPOS NOUN

OTHER

public static final MWEPOS OTHER

PROPER_NOUN

public static final MWEPOS PROPER_NOUN

ADVERB

public static final MWEPOS ADVERB

VERB

public static final MWEPOS VERB
Method Detail

values

public static final MWEPOS[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MWEPOS c : MWEPOS.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static MWEPOS valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getIdentifier

public char getIdentifier()
Returns the character identifier for the part-of-speech.

Returns:
the character identifier for the part-of-speech.
Since:
jMWE 1.0.0

getPrefixes

public Set<String> getPrefixes()
Returns the set of prefixes for the part-of-speech. Will not return null, but may return an empty set.

Returns:
the non-null, possibly empty set of prefixes for the part-of-speech.
Since:
jMWE 1.0.0

fromChar

public static MWEPOS fromChar(char identifier)
This convenience method allows retrieval of the MWEPOS object given the part of speech character.

Parameters:
identifier - the identifier for which the MWEPOS is needed; if no MWEPOS object corresponds to the specified identifier, this method returns null
Returns:
the MWEPOS corresponding to the specified identifier
Since:
jMWE 1.0.0

toMWEPOS

public static MWEPOS toMWEPOS(String tag)
This convenience method allows retrieval of the MWEPOS object given the part of speech tag as a String.

Parameters:
tag - the part-of-speech tag to be converted to an MWEPOS object
Returns:
the MWE part of speech object corresponding to the tag; if no appropriate tag is found, will return the OTHER object; will never return null
Throws:
NullPointerException - if the argument is null
IllegalArgumentException - if the argument is empty or all whitespace
Since:
jMWE 1.0.0


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