|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attribute
Representation of an attribute (set). Attributes are similar to
Event
s in that they have types and roles. But attributes are
entity-focused instead of event- (or action-) focused. Furthermore, most
attributes will be simple pairs (e.g., a person's height), but others are
more complex and include additional information, often the date and location
(e.g., a person's birth date and location).
The Attribute
span should cover all its roles and any
information considered in the context of the attribute set. For example, a
sentence-level attribute detection system would create an
Attribute
that spans the entire sentence and all its roles are
contained within that sentence.
Field Summary | |
---|---|
static AnnotationType<Attribute> |
TYPE
|
Method Summary | |
---|---|
Set<String> |
getAvailableRoles()
Returns the set role types that are available for this Attribute instance. |
Collection<Text> |
getRoles(String roleName)
Returns the Text of the role instances for this
Attribute with the given roleName. |
String |
getType()
Returns the type of this Attribute . |
Methods inherited from interface com.languagecomputer.api.text.Text |
---|
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations |
Field Detail |
---|
static final AnnotationType<Attribute> TYPE
Method Detail |
---|
String getType()
Attribute
.
Attribute
's type (or name).Set<String> getAvailableRoles()
Attribute
instance. There may be more types of roles for this
type of attribute, but this method will only return the types of roles that
it knows about. Furthermore, it is not guaranteed that all available roles
have an instance of that role attached to this Attribute
. In
other words, if a system knows all the possible role names, it may return
them here even if not all the roles are found within this
Attribute
, but the caller should also be able to handle
the case where this Attribute
only knows about the role names
based on what roles objects are actually attached to it.
Set
of role names that are known to this
Attribute
instance.Collection<Text> getRoles(String roleName)
Text
of the role instances for this
Attribute
with the given roleName. For many roles,
this will be a singleton Collection
, but having multiple roles
of the same type is supported as well.
roleName
- The name of the role to get the instances of.
Collection
of Text
s for all the roles
instances associated with this Attribute
with the given
roleName, or an empty Collection
if none exist.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |