edu.illinois.cs.cogcomp.lbj.coref.features
Class Capitals
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.features.Matches
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
Capitals
public Capitals()
- Default constructor.
Loads a list of capitals from the default file name.
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.