public class AposTokens
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
aposTokens |
protected static java.lang.String |
defaultAposTokensFileName |
Constructor and Description |
---|
AposTokens()
Create AposTokens.
|
AposTokens(java.lang.String langCode)
Create AposTokens for specified ISO language code.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getAposTokens()
Return current aposTokens.
|
int |
getAposTokensCount()
Get count of known aposrophe Tokens.
|
boolean |
isKnownAposToken(java.lang.String str)
Checks if string is a known token with apostrophe.
|
boolean |
loadAposTokens(java.lang.String aposTokensURL)
Load aposTokens list from a file.
|
static java.util.Set<java.lang.String> |
loadAposTokensFromResource(java.lang.String langCode)
Load apostrophe tokens set from resource properties file.
|
protected java.util.Set<java.lang.String> aposTokens
protected static final java.lang.String defaultAposTokensFileName
public AposTokens()
public AposTokens(java.lang.String langCode)
langCode
- ISO language code.public static java.util.Set<java.lang.String> loadAposTokensFromResource(java.lang.String langCode)
Each line in the UTF8 apostrophe tokens contains a single tokens which begins or ends with an apostrophe.
if there is not a resource file for the given language code, the aposTokens set will be empty.
public boolean loadAposTokens(java.lang.String aposTokensURL)
aposTokensURL
- AposTokens URL.public boolean isKnownAposToken(java.lang.String str)
str
- The string to check.public int getAposTokensCount()
public java.util.Set<java.lang.String> getAposTokens()