public class EnglishWord
extends java.lang.Object
Constructor and Description |
---|
EnglishWord() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isPreposition(java.lang.String word)
Tests whether a given String can be an English preposition.
|
static java.util.ArrayList |
processApostrophe(java.lang.String givenWord)
Tests and processes a given String (assumed to be a word with no
space in it) which may have apostrophes in it.
|
public static boolean isPreposition(java.lang.String word)
public static java.util.ArrayList processApostrophe(java.lang.String givenWord)
If there is no apostrophe in the given String, the method returns null. If the string (e.g. "o'clock", "O'Reilly") has an apostrophe but is not one of the types that the method recognizes, the "expanded" String in the returned value is the same as the given String, and the description in the returned value is "U" for Unknown.
Note: This method retains the initial capitalization of the first letter
of the given string.
givenWord
- a presumed English word that may have apostrophes in it.