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
Nested ClassesModifier and TypeClassDescriptionstatic classAttribute.Builder<T extends Attribute,B extends Attribute.Builder<T, B>> Base class for builders for attributes that inherit fromAttribute. -
Field Summary
FieldsFields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn the end character offset.intReturns the start character offset.protected com.google.common.base.MoreObjects.ToStringHelperMethods 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:
toStringHelperin classBaseAttribute
-