|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucdenver.ccp.nlp.biolemmatizer.Americanize
public class Americanize
Takes a String and returns an Americanized version of it based on a list of British-to-American spellings and some rules. This is deterministic spelling conversion, and so cannot deal with certain cases involving complex ambiguities, but it can do most of the simple case of English to American conversion.
The list and rules for handling
British-to-American spellings is derived from:
http://www.tysto.com/uk-us-spelling-list.html
.
Constructor Summary | |
---|---|
Americanize()
Constructor to load the British-to-American spelling mapping file |
Method Summary | |
---|---|
String |
americanize(String str)
Convert the spelling of a word from British to American English. |
static String |
join(String[] s,
String delimiter)
static method to concatenate String items with a specified delimiter |
static void |
main(String[] args)
Americanize and print the command line arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Americanize()
Method Detail |
---|
public String americanize(String str)
str
- The String to be Americanized
public static final String join(String[] s, String delimiter)
s
- delimiter
-
public static void main(String[] args) throws IOException
args
- Command line arguments: a list of words
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |