edu.mit.jwi.item
Enum POS

java.lang.Object
  extended by java.lang.Enum<POS>
      extended by edu.mit.jwi.item.POS
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<POS>

public enum POS
extends java.lang.Enum<POS>

Represents part of speech objects.

Since:
JWI 2.0.0
Version:
2.4.0
Author:
Mark A. Finlayson

Enum Constant Summary
ADJECTIVE
          Object representing the Adjective part of speech.
ADVERB
          Object representing the Adverb part of speech.
NOUN
          Object representing the Noun part of speech.
VERB
          Object representing the Verb part of speech.
 
Field Summary
static int NUM_ADJECTIVE
           
static int NUM_ADJECTIVE_SATELLITE
           
static int NUM_ADVERB
           
static int NUM_NOUN
           
static int NUM_VERB
           
static char TAG_ADJECTIVE
           
static char TAG_ADJECTIVE_SATELLITE
           
static char TAG_ADVERB
           
static char TAG_NOUN
           
static char TAG_VERB
           
 
Method Summary
 int getNumber()
          Returns the standard WordNet number of this part of speech
static POS getPartOfSpeech(char tag)
          Retrieves of the part of speech object given the tag.
static POS getPartOfSpeech(int num)
          Retrieves the part of speech object given the number.
 java.util.Set<java.lang.String> getResourceNameHints()
          Returns a set of strings that can be used to identify resource corresponding to objects with this part of speech.
 char getTag()
          The tag that is used to indicate this part of speech in Wordnet data files
static boolean isAdjectiveSatellite(char tag)
          Returns true if the specified character represents an adjective satellite, namely, if the number is 's' or 'S'; false otherwise
static boolean isAdjectiveSatellite(int num)
          Returns true if the specified number represents an adjective satellite, namely, if the number is 5; false otherwise
 java.lang.String toString()
           
static POS valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static POS[] 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, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NOUN

public static final POS NOUN
Object representing the Noun part of speech.

Since:
JWI 2.0.0

VERB

public static final POS VERB
Object representing the Verb part of speech.

Since:
JWI 2.0.0

ADJECTIVE

public static final POS ADJECTIVE
Object representing the Adjective part of speech.

Since:
JWI 2.0.0

ADVERB

public static final POS ADVERB
Object representing the Adverb part of speech.

Since:
JWI 2.0.0
Field Detail

NUM_NOUN

public static final int NUM_NOUN
See Also:
Constant Field Values

NUM_VERB

public static final int NUM_VERB
See Also:
Constant Field Values

NUM_ADJECTIVE

public static final int NUM_ADJECTIVE
See Also:
Constant Field Values

NUM_ADVERB

public static final int NUM_ADVERB
See Also:
Constant Field Values

NUM_ADJECTIVE_SATELLITE

public static final int NUM_ADJECTIVE_SATELLITE
See Also:
Constant Field Values

TAG_NOUN

public static final char TAG_NOUN
See Also:
Constant Field Values

TAG_VERB

public static final char TAG_VERB
See Also:
Constant Field Values

TAG_ADJECTIVE

public static final char TAG_ADJECTIVE
See Also:
Constant Field Values

TAG_ADVERB

public static final char TAG_ADVERB
See Also:
Constant Field Values

TAG_ADJECTIVE_SATELLITE

public static final char TAG_ADJECTIVE_SATELLITE
See Also:
Constant Field Values
Method Detail

values

public static final POS[] 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(POS c : POS.values())
        System.out.println(c);

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

valueOf

public static POS valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getResourceNameHints

public java.util.Set<java.lang.String> getResourceNameHints()
Returns a set of strings that can be used to identify resource corresponding to objects with this part of speech.

Returns:
an immutable set of resource name hints
Since:
JWI 2.2

getTag

public char getTag()
The tag that is used to indicate this part of speech in Wordnet data files

Returns:
the character representing this part of speech
Since:
JWI 2.0.0

getNumber

public int getNumber()
Returns the standard WordNet number of this part of speech

Returns:
the standard WordNet number of this part of speech
Since:
JWI 2.0.0

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<POS>

isAdjectiveSatellite

public static boolean isAdjectiveSatellite(int num)
Returns true if the specified number represents an adjective satellite, namely, if the number is 5; false otherwise

Parameters:
num - the number to be checked
Returns:
true if the specified number represents an adjective satellite, namely, if the number is 5; false otherwise
Since:
JWI 2.0.0

isAdjectiveSatellite

public static boolean isAdjectiveSatellite(char tag)
Returns true if the specified character represents an adjective satellite, namely, if the number is 's' or 'S'; false otherwise

Parameters:
tag - the character to be checked
Returns:
true if the specified number represents an adjective satellite, namely, if the number is 's' or 'S'; false otherwise
Since:
JWI 2.0.0

getPartOfSpeech

public static POS getPartOfSpeech(int num)
Retrieves the part of speech object given the number.

Parameters:
num - the number for the part of speech
Returns:
POS the part of speech object corresponding to the specified tag, or null if none is found
Since:
JWI 2.0.0

getPartOfSpeech

public static POS getPartOfSpeech(char tag)
Retrieves of the part of speech object given the tag. Accepts both lower and upper case characters.

Parameters:
tag -
Returns:
POS the part of speech object corresponding to the specified tag, or null if none is found
Since:
JWI 2.0.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.