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

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

public class StringTools
extends java.lang.Object

A collection of tools related to strings.


Constructor Summary
StringTools()
           
 
Method Summary
static java.util.Set<java.lang.String> getCapitalizedWords(Mention m, boolean useHead)
          Gets the set of capitalized words.
static java.lang.String getLCText(Mention m, boolean useHead)
          Gets the lowercased text of a mention.
static java.lang.String getText(Mention m, boolean useHead, boolean lowercase)
          Gets the text of a mention.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTools

public StringTools()
Method Detail

getCapitalizedWords

public static java.util.Set<java.lang.String> getCapitalizedWords(Mention m,
                                                                  boolean useHead)
Gets the set of capitalized words.

Parameters:
m - The mention whose words will be retrieved.
useHead - Whether words come from the head or extent.
Returns:
The set of words that begin with a capital letter.

getLCText

public static java.lang.String getLCText(Mention m,
                                         boolean useHead)
Gets the lowercased text of a mention.

Parameters:
m - The mention whose text to get.
useHead - Whether to get the head text or the extent text.
Returns:
the lowercased text of the mention.

getText

public static java.lang.String getText(Mention m,
                                       boolean useHead,
                                       boolean lowercase)
Gets the text of a mention.

Parameters:
m - The mention whose text to get.
useHead - Whether to get the head text or the extent text.
lowercase - Whether to lowercase the text.
Returns:
the text of the mention.