public interface LanguageModel extends AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static String |
GOOGLE_SENTENCE_END
ngram sentence end marker
|
static String |
GOOGLE_SENTENCE_START
ngram sentence start marker - note: this is not in the v1 data from Google
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getCount(List<String> tokens)
Get the occurrence count for the given token sequence.
|
long |
getCount(String token1)
Get the occurrence count for
token. |
long |
getCount(String token1,
String token2)
Get the occurrence count for the phrase
token1 token2. |
long |
getCount(String token1,
String token2,
String token3)
Get the occurrence count for the phrase
token1 token2 token3. |
long |
getTotalTokenCount() |
static final String GOOGLE_SENTENCE_START
static final String GOOGLE_SENTENCE_END
long getCount(String token1)
token.long getCount(String token1, String token2)
token1 token2.long getCount(String token1, String token2, String token3)
token1 token2 token3.long getTotalTokenCount()
void close()
close in interface AutoCloseable