public static class AnnotatedText.Builder extends Object
AnnotatedText
objects.Constructor and Description |
---|
AnnotatedText.Builder()
Constructs a builder.
|
AnnotatedText.Builder(AnnotatedText startingPoint)
Constructs a builder from an existing
AnnotatedText . |
Modifier and Type | Method and Description |
---|---|
Map<String,BaseAttribute> |
attributes()
Returns the current attributes.
|
AnnotatedText.Builder |
baseNounPhrases(ListAttribute<com.basistech.rosette.dm.BaseNounPhrase> baseNounPhrases)
Attaches a list of base noun phrases.
|
AnnotatedText |
build()
Constructs a
AnnotatedText object from the settings in this builder. |
AnnotatedText.Builder |
categorizerResults(ListAttribute<com.basistech.rosette.dm.CategorizerResult> categorizerResults)
Attaches a list of categorizer results.
|
CharSequence |
data()
Returns the current character data.
|
AnnotatedText.Builder |
data(CharSequence data)
Constructs a builder over some character data.
|
Map<String,List<String>> |
documentMetadata()
Returns the current document metadata.
|
AnnotatedText.Builder |
documentMetadata(Map<String,List<String>> mapOfValues)
Add all of the contents of a map of metadata to the document metadata.
|
AnnotatedText.Builder |
documentMetadata(String key,
List<String> value)
Adds an entry to the document metadata.
|
AnnotatedText.Builder |
documentMetadata(String key,
String value)
Adds an entry to the document metadata.
|
AnnotatedText.Builder |
entities(ListAttribute<com.basistech.rosette.dm.Entity> entities)
Attaches a list of entities.
|
AnnotatedText.Builder |
entityMentions(ListAttribute<com.basistech.rosette.dm.EntityMention> entityMentions)
Deprecated.
|
AnnotatedText.Builder |
languageDetectionRegions(ListAttribute<LanguageDetection> languageDetectionRegions)
Attaches a list of language detections.
|
AnnotatedText.Builder |
relationshipMentions(ListAttribute<com.basistech.rosette.dm.RelationshipMention> relationshipMentions)
Attaches a list of relationship mentions.
|
AnnotatedText.Builder |
resolvedEntities(ListAttribute<com.basistech.rosette.dm.ResolvedEntity> resolvedEntities)
Deprecated.
|
AnnotatedText.Builder |
scriptRegions(ListAttribute<ScriptRegion> scriptRegions)
Attaches a list of script regions.
|
AnnotatedText.Builder |
sentences(ListAttribute<com.basistech.rosette.dm.Sentence> sentences)
Attaches a list of sentences.
|
AnnotatedText.Builder |
sentimentResults(ListAttribute<com.basistech.rosette.dm.CategorizerResult> sentimentResults)
Attaches a list of sentiment results.
|
AnnotatedText.Builder |
tokens(ListAttribute<com.basistech.rosette.dm.Token> tokens)
Attaches a list of tokens.
|
AnnotatedText.Builder |
translatedData(ListAttribute<com.basistech.rosette.dm.TranslatedData> translatedData)
Attaches a TranslatedData object.
|
AnnotatedText.Builder |
translatedTokens(ListAttribute<com.basistech.rosette.dm.TranslatedTokens> translatedTokens)
Attaches a list of TranslatedTokens objects.
|
AnnotatedText.Builder |
wholeDocumentLanguageDetection(LanguageDetection languageDetection)
Attaches a whole-document language detection.
|
public AnnotatedText.Builder()
public AnnotatedText.Builder(AnnotatedText startingPoint)
AnnotatedText
.startingPoint
- source object to copypublic AnnotatedText.Builder data(CharSequence data)
data
- the data. This replaces and previous setting.public CharSequence data()
public AnnotatedText.Builder baseNounPhrases(ListAttribute<com.basistech.rosette.dm.BaseNounPhrase> baseNounPhrases)
baseNounPhrases
- the base noun phrases@Deprecated public AnnotatedText.Builder entityMentions(ListAttribute<com.basistech.rosette.dm.EntityMention> entityMentions)
entities(ListAttribute)
.entityMentions
- the entity mentionspublic AnnotatedText.Builder relationshipMentions(ListAttribute<com.basistech.rosette.dm.RelationshipMention> relationshipMentions)
relationshipMentions
- the relationship mentions.public AnnotatedText.Builder entities(ListAttribute<com.basistech.rosette.dm.Entity> entities)
entities
- the entities.@Deprecated public AnnotatedText.Builder resolvedEntities(ListAttribute<com.basistech.rosette.dm.ResolvedEntity> resolvedEntities)
entities(ListAttribute)
.resolvedEntities
- the resolved entitiespublic AnnotatedText.Builder languageDetectionRegions(ListAttribute<LanguageDetection> languageDetectionRegions)
languageDetectionRegions
- the language detectionspublic AnnotatedText.Builder wholeDocumentLanguageDetection(LanguageDetection languageDetection)
languageDetection
- the language detectionpublic AnnotatedText.Builder scriptRegions(ListAttribute<ScriptRegion> scriptRegions)
scriptRegions
- the script regionspublic AnnotatedText.Builder sentences(ListAttribute<com.basistech.rosette.dm.Sentence> sentences)
sentences
- the sentencespublic AnnotatedText.Builder tokens(ListAttribute<com.basistech.rosette.dm.Token> tokens)
tokens
- the tokenspublic AnnotatedText.Builder translatedTokens(ListAttribute<com.basistech.rosette.dm.TranslatedTokens> translatedTokens)
translatedTokens
- a list of TranslatedTokens objectspublic AnnotatedText.Builder translatedData(ListAttribute<com.basistech.rosette.dm.TranslatedData> translatedData)
translatedData
- a TranslatedData objectpublic AnnotatedText.Builder categorizerResults(ListAttribute<com.basistech.rosette.dm.CategorizerResult> categorizerResults)
categorizerResults
- the categorizer resultspublic AnnotatedText.Builder sentimentResults(ListAttribute<com.basistech.rosette.dm.CategorizerResult> sentimentResults)
sentimentResults
- the sentiment resultspublic Map<String,BaseAttribute> attributes()
public AnnotatedText.Builder documentMetadata(String key, List<String> value)
key
- keyvalue
- valuepublic AnnotatedText.Builder documentMetadata(Map<String,List<String>> mapOfValues)
mapOfValues
- a map from keys to values.public AnnotatedText.Builder documentMetadata(String key, String value)
key
- keyvalue
- A single string value. The result of this call is to store a list containing this value
as the value for this key.public Map<String,List<String>> documentMetadata()
public AnnotatedText build()
AnnotatedText
object from the settings in this builder.Copyright © 2016 Basis Technology Corporation. All Rights Reserved.