Package edu.stanford.nlp.pipeline
Class ServerAnnotatorImplementations
- java.lang.Object
-
- edu.stanford.nlp.pipeline.AnnotatorImplementations
-
- edu.stanford.nlp.pipeline.ServerAnnotatorImplementations
-
public class ServerAnnotatorImplementations extends AnnotatorImplementations
A set of annotator implementations, backed by the server (StanfordCoreNLPServer).- Author:
- Gabor Angeli
-
-
Field Summary
Fields Modifier and Type Field Description StringhostThe hostname of the server to hitStringkeyThe key to use as the username to authenticate with the server, or null.booleanlazyIf false, run many common annotations when we hit the server the first time.intportThe port to hit on the serverStringsecretThe secret key to use as the username to authenticate with the server, or null.
-
Constructor Summary
Constructors Constructor Description ServerAnnotatorImplementations(String host, int port)Create a new annotator implementation backed byStanfordCoreNLPServer.ServerAnnotatorImplementations(String host, int port, String key, String secret, boolean lazy)Create a new annotator implementation backed byStanfordCoreNLPServer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Annotatorcoref(Properties properties)Annotate for coreference (statistical or hybrid)AnnotatorcorefMention(Properties properties)Annotate for mention (statistical or hybrid)Annotatordcoref(Properties properties)Annotate for coreference (deterministic)Annotatordependencies(Properties properties)Annotate dependency relations in sentencesAnnotatorgender(Properties properties, String name)Annotate for gender of tokensAnnotatorkbp(Properties properties)Annotate for KBP relationsAnnotatorlink(Properties properties)Annotatorner(Properties properties)Annotate for named entities -- note that this combines multiple NER tag sets, and some auxiliary things (like temporal tagging)Annotatoropenie(Properties properties)AnnotateRelationTriples from text.Annotatorparse(Properties properties)Annotate parse treesAnnotatorposTagger(Properties properties)Part of speech tagAnnotatorrelations(Properties properties)Annotate for relations expressed in sentencesAnnotatorsentiment(Properties properties, String name)Annotate for sentiment in sentencesAnnotatortokensRegexNER(Properties properties, String name)Run RegexNER -- rule-based NER based on a deterministic mapping fileAnnotatortrueCase(Properties properties)Infer the original casing of tokens-
Methods inherited from class edu.stanford.nlp.pipeline.AnnotatorImplementations
cdcTokenizer, cleanXML, columnData, custom, docDate, entityMentions, morpha, multiWordToken, natlog, quote, quoteattribution, tokenizer, tokensregex, udfeats, wordToSentences
-
-
-
-
Field Detail
-
host
public final String host
The hostname of the server to hit
-
port
public final int port
The port to hit on the server
-
key
public final String key
The key to use as the username to authenticate with the server, or null.
-
secret
public final String secret
The secret key to use as the username to authenticate with the server, or null.
-
lazy
public final boolean lazy
If false, run many common annotations when we hit the server the first time.
-
-
Constructor Detail
-
ServerAnnotatorImplementations
public ServerAnnotatorImplementations(String host, int port, String key, String secret, boolean lazy)
Create a new annotator implementation backed byStanfordCoreNLPServer.- Parameters:
host- The hostname of the server.port- The port of the server.
-
ServerAnnotatorImplementations
public ServerAnnotatorImplementations(String host, int port)
Create a new annotator implementation backed byStanfordCoreNLPServer.- Parameters:
host- The hostname of the server.port- The port of the server.
-
-
Method Detail
-
posTagger
public Annotator posTagger(Properties properties)
Part of speech tag- Overrides:
posTaggerin classAnnotatorImplementations
-
ner
public Annotator ner(Properties properties)
Annotate for named entities -- note that this combines multiple NER tag sets, and some auxiliary things (like temporal tagging)- Overrides:
nerin classAnnotatorImplementations
-
tokensRegexNER
public Annotator tokensRegexNER(Properties properties, String name)
Run RegexNER -- rule-based NER based on a deterministic mapping file- Overrides:
tokensRegexNERin classAnnotatorImplementations
-
gender
public Annotator gender(Properties properties, String name)
Annotate for gender of tokens- Overrides:
genderin classAnnotatorImplementations
-
parse
public Annotator parse(Properties properties)
Annotate parse trees- Overrides:
parsein classAnnotatorImplementations- Parameters:
properties- Properties that control the behavior of the parser. It use "parse.x" properties.- Returns:
- A ParserAnnotator
-
trueCase
public Annotator trueCase(Properties properties)
Infer the original casing of tokens- Overrides:
trueCasein classAnnotatorImplementations
-
corefMention
public Annotator corefMention(Properties properties)
Annotate for mention (statistical or hybrid)- Overrides:
corefMentionin classAnnotatorImplementations
-
coref
public Annotator coref(Properties properties)
Annotate for coreference (statistical or hybrid)- Overrides:
corefin classAnnotatorImplementations
-
dcoref
public Annotator dcoref(Properties properties)
Annotate for coreference (deterministic)- Overrides:
dcorefin classAnnotatorImplementations
-
relations
public Annotator relations(Properties properties)
Annotate for relations expressed in sentences- Overrides:
relationsin classAnnotatorImplementations
-
sentiment
public Annotator sentiment(Properties properties, String name)
Annotate for sentiment in sentences- Overrides:
sentimentin classAnnotatorImplementations
-
dependencies
public Annotator dependencies(Properties properties)
Annotate dependency relations in sentences- Overrides:
dependenciesin classAnnotatorImplementations
-
openie
public Annotator openie(Properties properties)
AnnotateRelationTriples from text.- Overrides:
openiein classAnnotatorImplementations
-
kbp
public Annotator kbp(Properties properties)
Annotate for KBP relations- Overrides:
kbpin classAnnotatorImplementations
-
link
public Annotator link(Properties properties)
- Overrides:
linkin classAnnotatorImplementations
-
-