Package com.basistech.rosette.dm
Class EntityMention.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Attribute,Attribute.Builder<T,B>>
com.basistech.rosette.dm.Attribute.Builder<EntityMention,EntityMention.Builder>
com.basistech.rosette.dm.EntityMention.Builder
- Enclosing class:
- EntityMention
public static class EntityMention.Builder
extends Attribute.Builder<EntityMention,EntityMention.Builder>
A builder for entity mentions.
-
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute.Builder
endOffset, startOffset
-
Constructor Summary
ConstructorDescriptionConstructs a builder with the minimal required information for an entity mention.Builder
(EntityMention toCopy) Constructs a builder initialized with information from an existing entity mention. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the immutable mention.confidence
(Double confidence) Specifies the confidence.coreferenceChainId
(Integer coreferenceChainId) Specifies the coreference chain identifier.entityType
(String entityType) Specifies the entity type.flags
(int flags) Specifies the flags.protected EntityMention.Builder
getThis()
linkingConfidence
(Double linkingConfidence) Specifies the linking confidence.normalized
(String normalized) Specifies the normalized form of this mention.Specifies the source of this mention.Specifies the subsource of this mention.Methods inherited from class com.basistech.rosette.dm.Attribute.Builder
endOffset, setEndOffset, startOffset
Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
Constructs a builder with the minimal required information for an entity mention.- Parameters:
startOffset
- the start offset in the text, in charactersendOffset
- the end offset in the text, in charactersentityType
- the type of entity (e.g. "PERSON").
-
Builder
Constructs a builder initialized with information from an existing entity mention.- Parameters:
toCopy
- the mention to copy.
-
-
Method Details
-
entityType
Specifies the entity type.- Parameters:
entityType
- the entity type- Returns:
- this
-
confidence
Specifies the confidence.- Parameters:
confidence
- the confidence, or null to indicate that no confidence is available.- Returns:
- this
-
linkingConfidence
Specifies the linking confidence.- Parameters:
linkingConfidence
- the confidence, or null to indicate that no confidence is available.- Returns:
- this
-
coreferenceChainId
Specifies the coreference chain identifier. SeeEntityMention.getCoreferenceChainId()
.- Parameters:
coreferenceChainId
- the chain identifier, or null for a mention that is not linked.- Returns:
- this
-
flags
Specifies the flags.- Parameters:
flags
- flags value- Returns:
- this
-
source
Specifies the source of this mention.- Parameters:
source
- the source- Returns:
- this
-
subsource
Specifies the subsource of this mention.- Parameters:
subsource
- the subsource- Returns:
- this
-
normalized
Specifies the normalized form of this mention.- Parameters:
normalized
- the normalized form- Returns:
- this
-
build
Builds the immutable mention.- Returns:
- the mention
-
getThis
- Specified by:
getThis
in classAttribute.Builder<EntityMention,
EntityMention.Builder>
-