com.languagecomputer.api.text
Interface Event

All Superinterfaces:
Text
All Known Implementing Classes:
DefaultEvent

public interface Event
extends Text

Representation of an event. Events have a type (e.g., stock sale) as well as roles (e.g., buyer, seller, price, etc) which are both extracted from text. The Event span should cover all its roles and any information considered in the context of the event. For example, a sentence-level event detection system would create an Event that spans the entire sentence and all its roles are contained within that sentence.

Since:
1.0
Author:
Kirk Roberts

Field Summary
static AnnotationType<Event> TYPE
           
 
Method Summary
 Set<String> getAvailableRoles()
          Returns the set role types that are available for this Event instance.
 Collection<Text> getRoles(String roleName)
          Returns the Text of the roles instances for this Event with the given roleName.
 String getType()
          Returns the type of this Event.
 
Methods inherited from interface com.languagecomputer.api.text.Text
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations
 

Field Detail

TYPE

static final AnnotationType<Event> TYPE
Method Detail

getType

String getType()
Returns the type of this Event.

Returns:
This Event's type (or name).

getAvailableRoles

Set<String> getAvailableRoles()
Returns the set role types that are available for this Event instance. There may be more types of roles for this type of event, 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 Event. 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 Event, but the caller should also be able to handle the case where this Event only knows about the role names based on what roles objects are actually attached to it.

Returns:
A Set of role names that are known to this Event instance.

getRoles

Collection<Text> getRoles(String roleName)
Returns the Text of the roles instances for this Event 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.

Parameters:
roleName - Name of the role to get the instances of.
Returns:
A Collection of Texts for all the roles associated with this Event with the given roleName, or an empty Collection if none exist.


Copyright © 2009. All Rights Reserved.