com.basistech.util
Class NEConstants

java.lang.Object
  extended by com.basistech.util.NEConstants

public class NEConstants
extends Object

Constants used for labeling Named Entities.


Field Summary
static String NAMED_ENTITY_FACILITY
          Printable name for NAMED_ENTITY_FACILITY
static String NAMED_ENTITY_GPE
          Printable name for NAMED_ENTITY_GPE
static String NAMED_ENTITY_IDENTIFIER
          Printable name for NAMED_ENTITY_IDENTIFIER
static String NAMED_ENTITY_IDENTIFIER_CREDIT_CARD_NUM
          Printable name for NAMED_ENTITY_IDENTIFIER_CREDIT_CARD_NUM
static String NAMED_ENTITY_IDENTIFIER_DISTANCE
          Printable name for NAMED_ENTITY_IDENTIFIER_DISTANCE
static String NAMED_ENTITY_IDENTIFIER_DOMAIN_NAME
          Printable name for NAMED_ENTITY_IDENTIFIER_DOMAIN_NAME
static String NAMED_ENTITY_IDENTIFIER_EMAIL
          Printable name for NAMED_ENTITY_IDENTIFIER_EMAIL
static String NAMED_ENTITY_IDENTIFIER_FAX_NUMBER
          Printable name for NAMED_ENTITY_IDENTIFIER_FAX_NUMBER
static String NAMED_ENTITY_IDENTIFIER_IP_ADDRESS
          Printable name for NAMED_ENTITY_IDENTIFIER_IP_ADDRESS
static String NAMED_ENTITY_IDENTIFIER_LATITUDE_LONGITUDE
          Printable name for NAMED_ENTITY_IDENTIFIER_LATITUDE_LONGITUDE
static String NAMED_ENTITY_IDENTIFIER_MONEY
          Printable name for NAMED_ENTITY_IDENTIFIER_MONEY
static String NAMED_ENTITY_IDENTIFIER_NUMBER
          Printable name for NAMED_ENTITY_IDENTIFIER_NUMBER
static String NAMED_ENTITY_IDENTIFIER_OTHER
          Printable name for NAMED_ENTITY_IDENTIFIER_OTHER
static String NAMED_ENTITY_IDENTIFIER_PERCENT
          Printable name for NAMED_ENTITY_IDENTIFIER_PERCENT
static String NAMED_ENTITY_IDENTIFIER_PERSONAL_ID_NUM
          Printable name for NAMED_ENTITY_IDENTIFIER_PERSONAL_ID_NUM
static String NAMED_ENTITY_IDENTIFIER_PHONE_NUMBER
          Printable name for NAMED_ENTITY_IDENTIFIER_PHONE_NUMBER
static String NAMED_ENTITY_IDENTIFIER_URL
          Printable name for NAMED_ENTITY_IDENTIFIER_URL
static String NAMED_ENTITY_IDENTIFIER_UTM
          Printable name for NAMED_ENTITY_IDENTIFIER_UTM
static String NAMED_ENTITY_LOCATION
          Printable name for NAMED_ENTITY_LOCATION
static String NAMED_ENTITY_NATIONALITY
          Printable name for NAMED_ENTITY_NATIONALITY
static String NAMED_ENTITY_NONE
          Printable name for NAMED_ENTITY_NONE
static String NAMED_ENTITY_ORGANIZATION
          Printable name for NAMED_ENTITY_ORGANIZATION
static String NAMED_ENTITY_PERSON
          Printable name for NAMED_ENTITY_PERSON
static String NAMED_ENTITY_RELIGION
          Printable name for NAMED_ENTITY_RELIGION
static String NAMED_ENTITY_TEMPORAL
          Printable name for NAMED_ENTITY_TEMPORAL
static String NAMED_ENTITY_TEMPORAL_DATE
          Printable name for NAMED_ENTITY_TEMPORAL_DATE
static String NAMED_ENTITY_TEMPORAL_OTHER
          Printable name for NAMED_ENTITY_TEMPORAL_OTHER
static String NAMED_ENTITY_TEMPORAL_TIME
          Printable name for NAMED_ENTITY_TEMPORAL_TIME
static String NAMED_ENTITY_TITLE
          Printable name for NAMED_ENTITY_TITLE
static String NAMED_ENTITY_VEHICLE
          Printable name for NAMED_ENTITY_VEHICLE
static String NAMED_ENTITY_WEAPON
          Printable name for NAMED_ENTITY_WEAPON
static int NE_TYPE_FACILITY
          Facility name.
static int NE_TYPE_GPE
          Geo-political entity.
static int NE_TYPE_IDENTIFIER
          Electronic or other ephemeral identifier.
static int NE_TYPE_IDENTIFIER_CREDIT_CARD_NUM
          A credit card number
static int NE_TYPE_IDENTIFIER_DISTANCE
          Distance
static int NE_TYPE_IDENTIFIER_DOMAIN_NAME
          An Internet domain name
static int NE_TYPE_IDENTIFIER_EMAIL
          An E-mail address
static int NE_TYPE_IDENTIFIER_FAX_NUMBER
          A fax number
static int NE_TYPE_IDENTIFIER_IP_ADDRESS
          An Internet IP address
static int NE_TYPE_IDENTIFIER_LATITUDE_LONGITUDE
          Latitude Longitude Coordinates
static int NE_TYPE_IDENTIFIER_MONEY
          Monetary amounts
static int NE_TYPE_IDENTIFIER_NUMBER
          Number
static int NE_TYPE_IDENTIFIER_OTHER
          Other identifier instances
static int NE_TYPE_IDENTIFIER_PERCENT
          Percentages
static int NE_TYPE_IDENTIFIER_PERSONAL_ID_NUM
          Personal ID number, such as a US SSN.
static int NE_TYPE_IDENTIFIER_PHONE_NUMBER
          A telephone (landline, mobile) number
static int NE_TYPE_IDENTIFIER_URL
          A URL
static int NE_TYPE_IDENTIFIER_UTM
          Universal Transverse Mercator Coordinates
static int NE_TYPE_LOCATION
          Location name.
static int NE_TYPE_NATIONALITY
          Nationality types.
static int NE_TYPE_NONE
          Unknown or uncodable.
static int NE_TYPE_ORGANIZATION
          Organizations.
static int NE_TYPE_PERSON
          Persons
static int NE_TYPE_RELIGION
          Religion types.
static int NE_TYPE_TEMPORAL
          Times and Dates.
static int NE_TYPE_TEMPORAL_DATE
          A date
static int NE_TYPE_TEMPORAL_OTHER
          Other temporal instances
static int NE_TYPE_TEMPORAL_TIME
          A time
static int NE_TYPE_TITLE
          Title types.
static int NE_TYPE_USER_DEFINED_START
          Start of the user-defined NE type space
static int NE_TYPE_VEHICLE
          Vehicle types.
static int NE_TYPE_WEAPON
          Weapon types.
 
Constructor Summary
NEConstants()
           
 
Method Summary
static int getFulltype(int t)
          Returns the fulltype of the named entity.
static int getSource(int t)
          Returns the id of the Language Processor (LP) where the named entity type came from
static int getSubtype(int t)
          Returns the subtype of the Named Entity Type
static int getType(int t)
          Returns the major type of the Named Entity Type
static boolean isFACILITY(int t)
          Determines if the named entity is a facility.
static boolean isGPE(int t)
          Determines if the named entity is a gpe.
static boolean isIDENTIFIER(int t)
          Determines if the named entity is a identifier.
static boolean isLOCATION(int t)
          Determines if the named entity is a location.
static boolean isNATIONALITY(int t)
          Determines if the named entity is a nationality.
static boolean isNONE(int t)
          Determines if the named entity is a none.
static boolean isORGANIZATION(int t)
          Determines if the named entity is a organization.
static boolean isPERSON(int t)
          Determines if the named entity is a person.
static boolean isRELIGION(int t)
          Determines if the named entity is a religion.
static boolean isTEMPORAL(int t)
          Determines if the named entity is a temporal.
static boolean isTITLE(int t)
          Determines if the named entity is a title.
static boolean isVEHICLE(int t)
          Determines if the named entity is a vehicle.
static boolean isWEAPON(int t)
          Determines if the named entity is a weapon.
static int parse(String s)
          Takes a standard human-readable named entity type name and returns the integer constant.
static int setSource(int s, int t)
          Computes a composite value from the source and the type.
static String toString(int v)
          Takes a named entity type constant and returns the human-readable name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NE_TYPE_USER_DEFINED_START

public static final int NE_TYPE_USER_DEFINED_START
Start of the user-defined NE type space

See Also:
Constant Field Values

NE_TYPE_NONE

public static final int NE_TYPE_NONE
Unknown or uncodable.

See Also:
Constant Field Values

NE_TYPE_PERSON

public static final int NE_TYPE_PERSON
Persons

See Also:
Constant Field Values

NE_TYPE_ORGANIZATION

public static final int NE_TYPE_ORGANIZATION
Organizations.

See Also:
Constant Field Values

NE_TYPE_LOCATION

public static final int NE_TYPE_LOCATION
Location name.

See Also:
Constant Field Values

NE_TYPE_FACILITY

public static final int NE_TYPE_FACILITY
Facility name.

See Also:
Constant Field Values

NE_TYPE_GPE

public static final int NE_TYPE_GPE
Geo-political entity.

See Also:
Constant Field Values

NE_TYPE_VEHICLE

public static final int NE_TYPE_VEHICLE
Vehicle types.

See Also:
Constant Field Values

NE_TYPE_WEAPON

public static final int NE_TYPE_WEAPON
Weapon types.

See Also:
Constant Field Values

NE_TYPE_TEMPORAL

public static final int NE_TYPE_TEMPORAL
Times and Dates.

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER

public static final int NE_TYPE_IDENTIFIER
Electronic or other ephemeral identifier.

See Also:
Constant Field Values

NE_TYPE_RELIGION

public static final int NE_TYPE_RELIGION
Religion types.

See Also:
Constant Field Values

NE_TYPE_NATIONALITY

public static final int NE_TYPE_NATIONALITY
Nationality types.

See Also:
Constant Field Values

NE_TYPE_TITLE

public static final int NE_TYPE_TITLE
Title types.

See Also:
Constant Field Values

NE_TYPE_TEMPORAL_DATE

public static final int NE_TYPE_TEMPORAL_DATE
A date

See Also:
Constant Field Values

NE_TYPE_TEMPORAL_TIME

public static final int NE_TYPE_TEMPORAL_TIME
A time

See Also:
Constant Field Values

NE_TYPE_TEMPORAL_OTHER

public static final int NE_TYPE_TEMPORAL_OTHER
Other temporal instances

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_EMAIL

public static final int NE_TYPE_IDENTIFIER_EMAIL
An E-mail address

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_URL

public static final int NE_TYPE_IDENTIFIER_URL
A URL

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_DOMAIN_NAME

public static final int NE_TYPE_IDENTIFIER_DOMAIN_NAME
An Internet domain name

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_IP_ADDRESS

public static final int NE_TYPE_IDENTIFIER_IP_ADDRESS
An Internet IP address

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_PHONE_NUMBER

public static final int NE_TYPE_IDENTIFIER_PHONE_NUMBER
A telephone (landline, mobile) number

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_FAX_NUMBER

public static final int NE_TYPE_IDENTIFIER_FAX_NUMBER
A fax number

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_PERSONAL_ID_NUM

public static final int NE_TYPE_IDENTIFIER_PERSONAL_ID_NUM
Personal ID number, such as a US SSN.

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_LATITUDE_LONGITUDE

public static final int NE_TYPE_IDENTIFIER_LATITUDE_LONGITUDE
Latitude Longitude Coordinates

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_CREDIT_CARD_NUM

public static final int NE_TYPE_IDENTIFIER_CREDIT_CARD_NUM
A credit card number

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_MONEY

public static final int NE_TYPE_IDENTIFIER_MONEY
Monetary amounts

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_PERCENT

public static final int NE_TYPE_IDENTIFIER_PERCENT
Percentages

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_UTM

public static final int NE_TYPE_IDENTIFIER_UTM
Universal Transverse Mercator Coordinates

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_DISTANCE

public static final int NE_TYPE_IDENTIFIER_DISTANCE
Distance

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_NUMBER

public static final int NE_TYPE_IDENTIFIER_NUMBER
Number

See Also:
Constant Field Values

NE_TYPE_IDENTIFIER_OTHER

public static final int NE_TYPE_IDENTIFIER_OTHER
Other identifier instances

See Also:
Constant Field Values

NAMED_ENTITY_NONE

public static final String NAMED_ENTITY_NONE
Printable name for NAMED_ENTITY_NONE

See Also:
Constant Field Values

NAMED_ENTITY_PERSON

public static final String NAMED_ENTITY_PERSON
Printable name for NAMED_ENTITY_PERSON

See Also:
Constant Field Values

NAMED_ENTITY_ORGANIZATION

public static final String NAMED_ENTITY_ORGANIZATION
Printable name for NAMED_ENTITY_ORGANIZATION

See Also:
Constant Field Values

NAMED_ENTITY_LOCATION

public static final String NAMED_ENTITY_LOCATION
Printable name for NAMED_ENTITY_LOCATION

See Also:
Constant Field Values

NAMED_ENTITY_FACILITY

public static final String NAMED_ENTITY_FACILITY
Printable name for NAMED_ENTITY_FACILITY

See Also:
Constant Field Values

NAMED_ENTITY_GPE

public static final String NAMED_ENTITY_GPE
Printable name for NAMED_ENTITY_GPE

See Also:
Constant Field Values

NAMED_ENTITY_VEHICLE

public static final String NAMED_ENTITY_VEHICLE
Printable name for NAMED_ENTITY_VEHICLE

See Also:
Constant Field Values

NAMED_ENTITY_WEAPON

public static final String NAMED_ENTITY_WEAPON
Printable name for NAMED_ENTITY_WEAPON

See Also:
Constant Field Values

NAMED_ENTITY_TEMPORAL

public static final String NAMED_ENTITY_TEMPORAL
Printable name for NAMED_ENTITY_TEMPORAL

See Also:
Constant Field Values

NAMED_ENTITY_TEMPORAL_DATE

public static final String NAMED_ENTITY_TEMPORAL_DATE
Printable name for NAMED_ENTITY_TEMPORAL_DATE

See Also:
Constant Field Values

NAMED_ENTITY_TEMPORAL_TIME

public static final String NAMED_ENTITY_TEMPORAL_TIME
Printable name for NAMED_ENTITY_TEMPORAL_TIME

See Also:
Constant Field Values

NAMED_ENTITY_TEMPORAL_OTHER

public static final String NAMED_ENTITY_TEMPORAL_OTHER
Printable name for NAMED_ENTITY_TEMPORAL_OTHER

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER

public static final String NAMED_ENTITY_IDENTIFIER
Printable name for NAMED_ENTITY_IDENTIFIER

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_EMAIL

public static final String NAMED_ENTITY_IDENTIFIER_EMAIL
Printable name for NAMED_ENTITY_IDENTIFIER_EMAIL

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_URL

public static final String NAMED_ENTITY_IDENTIFIER_URL
Printable name for NAMED_ENTITY_IDENTIFIER_URL

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_DOMAIN_NAME

public static final String NAMED_ENTITY_IDENTIFIER_DOMAIN_NAME
Printable name for NAMED_ENTITY_IDENTIFIER_DOMAIN_NAME

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_IP_ADDRESS

public static final String NAMED_ENTITY_IDENTIFIER_IP_ADDRESS
Printable name for NAMED_ENTITY_IDENTIFIER_IP_ADDRESS

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_PHONE_NUMBER

public static final String NAMED_ENTITY_IDENTIFIER_PHONE_NUMBER
Printable name for NAMED_ENTITY_IDENTIFIER_PHONE_NUMBER

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_FAX_NUMBER

public static final String NAMED_ENTITY_IDENTIFIER_FAX_NUMBER
Printable name for NAMED_ENTITY_IDENTIFIER_FAX_NUMBER

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_PERSONAL_ID_NUM

public static final String NAMED_ENTITY_IDENTIFIER_PERSONAL_ID_NUM
Printable name for NAMED_ENTITY_IDENTIFIER_PERSONAL_ID_NUM

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_LATITUDE_LONGITUDE

public static final String NAMED_ENTITY_IDENTIFIER_LATITUDE_LONGITUDE
Printable name for NAMED_ENTITY_IDENTIFIER_LATITUDE_LONGITUDE

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_CREDIT_CARD_NUM

public static final String NAMED_ENTITY_IDENTIFIER_CREDIT_CARD_NUM
Printable name for NAMED_ENTITY_IDENTIFIER_CREDIT_CARD_NUM

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_MONEY

public static final String NAMED_ENTITY_IDENTIFIER_MONEY
Printable name for NAMED_ENTITY_IDENTIFIER_MONEY

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_PERCENT

public static final String NAMED_ENTITY_IDENTIFIER_PERCENT
Printable name for NAMED_ENTITY_IDENTIFIER_PERCENT

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_UTM

public static final String NAMED_ENTITY_IDENTIFIER_UTM
Printable name for NAMED_ENTITY_IDENTIFIER_UTM

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_DISTANCE

public static final String NAMED_ENTITY_IDENTIFIER_DISTANCE
Printable name for NAMED_ENTITY_IDENTIFIER_DISTANCE

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_NUMBER

public static final String NAMED_ENTITY_IDENTIFIER_NUMBER
Printable name for NAMED_ENTITY_IDENTIFIER_NUMBER

See Also:
Constant Field Values

NAMED_ENTITY_IDENTIFIER_OTHER

public static final String NAMED_ENTITY_IDENTIFIER_OTHER
Printable name for NAMED_ENTITY_IDENTIFIER_OTHER

See Also:
Constant Field Values

NAMED_ENTITY_RELIGION

public static final String NAMED_ENTITY_RELIGION
Printable name for NAMED_ENTITY_RELIGION

See Also:
Constant Field Values

NAMED_ENTITY_NATIONALITY

public static final String NAMED_ENTITY_NATIONALITY
Printable name for NAMED_ENTITY_NATIONALITY

See Also:
Constant Field Values

NAMED_ENTITY_TITLE

public static final String NAMED_ENTITY_TITLE
Printable name for NAMED_ENTITY_TITLE

See Also:
Constant Field Values
Constructor Detail

NEConstants

public NEConstants()
Method Detail

toString

public static String toString(int v)
Takes a named entity type constant and returns the human-readable name.

Parameters:
v - The named entity type.
Returns:
Human-readable name.

parse

public static int parse(String s)
                 throws InvalidNamedEntityTypeNameException
Takes a standard human-readable named entity type name and returns the integer constant.

Parameters:
s - Named entity type name.
Returns:
Integer constant for the given entity type.
Throws:
InvalidNamedEntityTypeNameException - when an ID for the string can not be found.

getType

public static int getType(int t)
Returns the major type of the Named Entity Type

Parameters:
t - Named entity type ID
Returns:
Major type

getSubtype

public static int getSubtype(int t)
Returns the subtype of the Named Entity Type

Parameters:
t - Named entity type ID
Returns:
Subtype

getSource

public static int getSource(int t)
Returns the id of the Language Processor (LP) where the named entity type came from

Parameters:
t - Named entity type ID
Returns:
LP id

getFulltype

public static int getFulltype(int t)
Returns the fulltype of the named entity. This removes the LP source information from the NE integer and is useful when comparing to constants.

Parameters:
t - Named entity type ID
Returns:
Type

setSource

public static int setSource(int s,
                            int t)
Computes a composite value from the source and the type.

Parameters:
s - The source
t - The type
Returns:
The composed type

isNONE

public static boolean isNONE(int t)
Determines if the named entity is a none.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a none , false otherwise.

isPERSON

public static boolean isPERSON(int t)
Determines if the named entity is a person.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a person , false otherwise.

isORGANIZATION

public static boolean isORGANIZATION(int t)
Determines if the named entity is a organization.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a organization , false otherwise.

isLOCATION

public static boolean isLOCATION(int t)
Determines if the named entity is a location.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a location , false otherwise.

isFACILITY

public static boolean isFACILITY(int t)
Determines if the named entity is a facility.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a facility , false otherwise.

isGPE

public static boolean isGPE(int t)
Determines if the named entity is a gpe.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a gpe , false otherwise.

isVEHICLE

public static boolean isVEHICLE(int t)
Determines if the named entity is a vehicle.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a vehicle , false otherwise.

isWEAPON

public static boolean isWEAPON(int t)
Determines if the named entity is a weapon.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a weapon , false otherwise.

isTEMPORAL

public static boolean isTEMPORAL(int t)
Determines if the named entity is a temporal.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a temporal , false otherwise.

isIDENTIFIER

public static boolean isIDENTIFIER(int t)
Determines if the named entity is a identifier.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a identifier , false otherwise.

isRELIGION

public static boolean isRELIGION(int t)
Determines if the named entity is a religion.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a religion , false otherwise.

isNATIONALITY

public static boolean isNATIONALITY(int t)
Determines if the named entity is a nationality.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a nationality , false otherwise.

isTITLE

public static boolean isTITLE(int t)
Determines if the named entity is a title.

Parameters:
t - Named entity type ID
Returns:
true if the named entity is a title , false otherwise.


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.