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

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

public class Capitals
extends Matches

A class for loading a list of pairs of capitals of countries and checking to see whether one location is the capital of a country. Methods to check matches are in the superclass. In general, lowercase strings should be used when storing or querying.


Field Summary
static java.lang.String DEFAULT_FILENAME
          The default file.
protected  java.util.Map<java.lang.String,java.lang.String> m_capitalsToCountry
           
protected  java.util.Map<java.lang.String,java.lang.String> m_countryToCapitals
           
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.features.Matches
m_aToB, m_bToA
 
Constructor Summary
Capitals()
          Default constructor.
 
Method Summary
protected  void load(java.lang.String filename)
          Loads the set of capitals.
static void main(java.lang.String[] args)
          The main method, useful for testing.
 
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

public static java.lang.String DEFAULT_FILENAME
The default file.


m_countryToCapitals

protected java.util.Map<java.lang.String,java.lang.String> m_countryToCapitals

m_capitalsToCountry

protected java.util.Map<java.lang.String,java.lang.String> m_capitalsToCountry
Constructor Detail

Capitals

public Capitals()
Default constructor. Loads a list of capitals from the default file name.

Method Detail

main

public static void main(java.lang.String[] args)
The main method, useful for testing.

Parameters:
args - No arguments are needed.

load

protected void load(java.lang.String filename)
Loads the set of capitals.

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