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

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

public class NumberFeatures
extends java.lang.Object

A collection of features related to the number (singular or plural) of a phrase or mention.


Constructor Summary
NumberFeatures()
           
 
Method Summary
static java.lang.String doNumbersMatchStrong(CExample ex, boolean useDicts)
          Determines if the number (singular or plural) of two mentions match.
static char getNumber(java.lang.String phrase)
          Determines the number of a phrase in a simpler way, for use in baseline systems.
static char getNumberStrong(Mention m, boolean useDicts)
          Determines the number (singular or plural) of a mention.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberFeatures

public NumberFeatures()
Method Detail

doNumbersMatchStrong

public static java.lang.String doNumbersMatchStrong(CExample ex,
                                                    boolean useDicts)
Determines if the number (singular or plural) of two mentions match. Number matches if getNumberStrong(edu.illinois.cs.cogcomp.lbj.coref.ir.Mention, boolean) match or extent texts match.

Parameters:
ex - The example containing the mentions in question.
useDicts - Determines whether lists of singular and plural words should be consulted.
Returns:
"t" (true: they match), "f" (false: they don't match), or "u" (unknown: one or more numbers cannot be determined).

getNumberStrong

public static char getNumberStrong(Mention m,
                                   boolean useDicts)
Determines the number (singular or plural) of a mention. If the mention is a NAM, assume singular if "and" does not occur in the head; otherwise unknown. If NOM or PRE, the head is looked up in lists of singular and plural words; if in only one list, return the appropriate number; otherwise unknown. If PRO, use a table of pronouns and their number. Caches the predicted number in Mention.m_predNumber.

Parameters:
m - The mention to be examined.
useDicts - Determines whether extensive lists of singular and plural words should be consulted.
Returns:
's' (singular), 'p' (plural), or 'u' (unknown).

getNumber

public static char getNumber(java.lang.String phrase)
Determines the number of a phrase in a simpler way, for use in baseline systems. If phrase is a known pronoun, number is determined by table lookup, otherwise, if evidence of a personal name (contains a first name or an honorary title), assume singular, otherwise, if ending with "s" assume plural, otherwise unknown.

Parameters:
phrase - The phrase in question.
Returns:
's' (singular), 'p' (plural), or 'u' (unknown).