Package com.basistech.rosette.dm
Class Mention.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Attribute,Attribute.Builder<T,B>>
com.basistech.rosette.dm.Attribute.Builder<Mention,Mention.Builder>
com.basistech.rosette.dm.Mention.Builder
- Enclosing class:
- Mention
A builder for entity mentions.
-
Field Summary
Fields inherited from class com.basistech.rosette.dm.Attribute.Builder
endOffset, startOffset
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the immutable mention.confidence
(Double confidence) Specifies the confidence.protected Mention.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
public Builder(int startOffset, int endOffset) 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 characters
-
Builder
Constructs a builder initialized with information from an existing entity mention.- Parameters:
toCopy
- the mention to copy.
-
-
Method Details
-
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 linking confidence, or null to indicate that no confidence is available.- 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<Mention,
Mention.Builder>
-