edu.illinois.cs.cogcomp.lbj.coref.features
Class Nicknames

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.features.Matches
      extended by edu.illinois.cs.cogcomp.lbj.coref.features.Nicknames

public class Nicknames
extends Matches

Stores a two-way mapping between nicknames and full names. By default, the list of nicknames is stored in the file "gazetteers/nicknamesPeople.txt" relative to the classpath.

Author:
Eric Bengtson

Field Summary
protected static java.lang.String DEFAULT_FILENAME
           
protected static Nicknames m_instance
           
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.features.Matches
m_aToB, m_bToA
 
Constructor Summary
Nicknames()
          Constructs a new nicknames mapping from the default filename (See the class comment for details).
 
Method Summary
static Nicknames get()
          Gets the single instance of Nicknames.
protected  void load(java.lang.String filename)
          Loads the mapping from the given filename into this.
static void main(java.lang.String[] args)
          A main method for testing this class.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.features.Matches
doMatch, removeParenthetical, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_FILENAME

protected static java.lang.String DEFAULT_FILENAME

m_instance

protected static Nicknames m_instance
Constructor Detail

Nicknames

public Nicknames()
Constructs a new nicknames mapping from the default filename (See the class comment for details).

Method Detail

get

public static Nicknames get()
Gets the single instance of Nicknames.

Returns:
The single instance of Nicknames, which is cached here.

main

public static void main(java.lang.String[] args)
A main method for testing this class.

Parameters:
args - None needed.

load

protected void load(java.lang.String filename)
Loads the mapping from the given filename into this. The format of the file is one mapping per line in the format a:b Optionally, b may be a comma-space (", ") separated list, in which case, each element of that list will be associated with a, while a will be associated with b treated as a single string. Lines beginning with a pound sign (#) are ignored.

Overrides:
load in class Matches
Parameters:
filename - The name of the file, relative to the classpath.