Package com.basistech.rosette.dm
Class Attribute
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.Attribute
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BaseNounPhrase
,EntityMention
,EventMention
,EventRole
,Extent
,LanguageDetection
,LayoutRegion
,Mention
,RelationshipMention
,ResolvedEntity
,ScriptRegion
,Sentence
,Token
Base class for attributes that span a range of text. These attributes
have a start and end offset. The offsets refer to a half-open range
of characters (UTF-16 elements).
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Attribute.Builder<T extends Attribute,
B extends Attribute.Builder<T, B>> Base class for builders for attributes that inherit fromAttribute
. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the end character offset.int
Returns the start character offset.protected com.google.common.base.MoreObjects.ToStringHelper
Methods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
-
Field Details
-
startOffset
protected final int startOffset -
endOffset
protected final int endOffset
-
-
Constructor Details
-
Attribute
protected Attribute(int startOffset, int endOffset) -
Attribute
-
-
Method Details
-
getStartOffset
public int getStartOffset()Returns the start character offset.- Returns:
- the start character offset
-
getEndOffset
public int getEndOffset()Return the end character offset.- Returns:
- the end character offset
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelper
in classBaseAttribute
-