|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.process.Americanize
public class Americanize
Takes a HasWord or String and returns a lowercase version of it. This is deterministic spelling coversion, and so cannot deal with certain cases involving complex ambiguities, but it can do most of the simple case of English to American conversion. This list is still quite incomplete, but does some of the commenest cases found when running our parser or doing biomedical processing.
Field Summary | |
---|---|
static int |
DONT_CAPITALIZE_TIMEX
|
Constructor Summary | |
---|---|
Americanize()
|
|
Americanize(int flags)
Make an object for Americanizing spelling. |
Method Summary | |
---|---|
static String |
americanize(String str)
Convert the spelling of a word from British to American English. |
static String |
americanize(String str,
boolean capitalizeTimex)
Convert the spelling of a word from British to American English. |
Object |
apply(Object in)
Americanize the HasWord or String coming in. |
static void |
main(String[] args)
Americanize and print the command line arguments. |
void |
setStaticCapitalizeTimex(boolean capitalizeTimex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DONT_CAPITALIZE_TIMEX
Constructor Detail |
---|
public Americanize()
public Americanize(int flags)
flags
- An integer representing bit flags. At present the only
recognized flag is DONT_CAPITALIZE_TIMEX = 1 which suppresses
capitalization of days of the week and monthsMethod Detail |
---|
public Object apply(Object in)
apply
in interface Function
in
- A HasWord or String to covert to American if needed.
public static String americanize(String str)
str
- The String to be Americanized
public static String americanize(String str, boolean capitalizeTimex)
public void setStaticCapitalizeTimex(boolean capitalizeTimex)
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |