public abstract class LanguageModel extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
TOKEN_LENGTH_LIMIT
Public definitions.
|
| Constructor and Description |
|---|
LanguageModel() |
| Modifier and Type | Method and Description |
|---|---|
static LanguageModel |
buildLanguage(String lang_code)
Factory method, loads libraries for StanfordCoreNLP based on the given
language code.
|
abstract String |
getNodeKey(String text,
String pos)
Prepare a stable key for a graph node (stemmed, lemmatized)
from a token.
|
abstract boolean |
isAdjective(String pos)
Determine whether the given PoS tag is an adjective.
|
abstract boolean |
isNoun(String pos)
Determine whether the given PoS tag is a noun.
|
boolean |
isRelevant(String pos)
Determine whether the given PoS tag is relevant to add to the
graph.
|
abstract Sentence |
parseSentence(String text)
Tokenize and tag the sentence text.
|
String |
scrubToken(String token_text)
Clean the text for a token.
|
abstract String[] |
splitParagraph(String text)
Split sentences within the paragraph text.
|
abstract String |
stemToken(String token)
Perform stemming on the given token.
|
public static final int TOKEN_LENGTH_LIMIT
public static LanguageModel buildLanguage(String lang_code)
public abstract String[] splitParagraph(String text)
public abstract Sentence parseSentence(String text)
public abstract String getNodeKey(String text, String pos)
public boolean isRelevant(String pos)
public abstract boolean isNoun(String pos)
public abstract boolean isAdjective(String pos)
Copyright © 2017. All rights reserved.