Package edu.fiu.jtlex.data
Class Instance
java.lang.Object
edu.fiu.jtlex.data.Instance
Default implementation of
IMakeInstance.- Author:
- arada002
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.fiu.jtlex.data.IInstance
IInstance.Aspect, IInstance.Polarity, IInstance.Pos, IInstance.Tense -
Constructor Summary
ConstructorsConstructorDescriptionInstance(int eventInstanceID, IEvent event, IInstance.Tense tense, IInstance.Aspect aspect, IInstance.Pos pos, IInstance.Polarity polarity, String modality, ISignal signal, String cardinality)Creates a new event Instance object. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a link to the set of IN links from this node.voidaddOutLink(ILink link)Add a link to the set of OUT links from this node.clone()booleanReturns the aspect of the verbal phrase.Returns the cardinality of the event instance.getEvent()Returns the ID of the event to which the instance is related.intgetId()Returns the integer part of the node ID.getIdStr()Returns the full string representation of the node ID.Returns a set of links that have this node as a target.The modality attribute is only present if there is a modal word present that modifies the instance.Returns a set of links that have this node as a origin.Returns the polarity of the eventInstance.getPos()Returns the syntactic category of the phrase (part of speech).Returns the signal object.getTense()Returns the tense of the verbal phrase.getType()Return the integer that corresponds with the type.voidremoveInLink(ILink link)Removes a link that has this node as a target.voidremoveOutLink(ILink link)Removes a link that has this node as an origin.toJSON()Returns the JSON (RFC 8259) representation of the Node.toString()
-
Constructor Details
-
Instance
public Instance(int eventInstanceID, IEvent event, IInstance.Tense tense, IInstance.Aspect aspect, IInstance.Pos pos, IInstance.Polarity polarity, String modality, ISignal signal, String cardinality)Creates a new event Instance object.- Parameters:
eventInstanceID- a unique ID number may not be less than 1event- the even to which event instance is relatedtense- phrase tense may not benullaspect- phrase aspect may not benullpos- part of speech, syntactic category of phrase may not benullpolarity- indicates whether the eventInstance phrase is negated may not benullmodality- modal word that modifies the instance may benullsignal- the signal object, present if multiple event instances are creatednullif not defined may not be less than 0cardinality- only present if there is a signal that provides its value 0 if not defined may not be less than 0
-
-
Method Details
-
getId
public int getId()Description copied from interface:INodeReturns the integer part of the node ID. Each event has to be identified by a unique ID number. -
getEvent
Description copied from interface:IInstanceReturns the ID of the event to which the instance is related. -
getTense
Description copied from interface:IInstanceReturns the tense of the verbal phrase. -
getAspect
Description copied from interface:IInstanceReturns the aspect of the verbal phrase. -
getPos
Description copied from interface:IInstanceReturns the syntactic category of the phrase (part of speech). -
getModality
Description copied from interface:IInstanceThe modality attribute is only present if there is a modal word present that modifies the instance.- Specified by:
getModalityin interfaceIInstance- Returns:
- the modal word that modifies the instance.
May return
null. - See Also:
- Modality (natural language)
-
getPolarity
Description copied from interface:IInstanceReturns the polarity of the eventInstance. The polarity of an event instance is a required attribute represented by the boolean attribute, polarity.
If it is set to ’NEG’, the event instance is negated.
If it is set to ’POS’ or not present in the annotation, the event instance is not negated.- Specified by:
getPolarityin interfaceIInstance- Returns:
- polarity:
NEG if the phrase is negated,
POS if the phrase is not negated.
May not return
null.
-
getSignal
Description copied from interface:IInstanceReturns the signal object. -
getCardinality
Description copied from interface:IInstanceReturns the cardinality of the event instance.
Cardinality is only present if there is a signal that provides its value.
There are also cases, where the annotator can either create as many MAKEINSTANCEs as motivated by the text or one MAKEINSTANCE which carries a cardinality value. Examples are the following:- John taught twice on Monday.
- John taught 150 times last year.
- Specified by:
getCardinalityin interfaceIInstance- Returns:
- Cardinality
0if not defined. May not return less than0. - See Also:
IInstance
-
getType
Description copied from interface:INodeReturn the integer that corresponds with the type. Each event can be categorized under three different types. -
getIdStr
Description copied from interface:INodeReturns the full string representation of the node ID. Each event has to be identified by a unique ID number and String. -
addOutLink
Description copied from interface:INodeAdd a link to the set of OUT links from this node.- Specified by:
addOutLinkin interfaceINode- Parameters:
link- a new OUT link from this node.
-
addInLink
Description copied from interface:INodeAdd a link to the set of IN links from this node. -
getOutLinks
Description copied from interface:INodeReturns a set of links that have this node as a origin.- Specified by:
getOutLinksin interfaceINode- Returns:
- a set of links that have this node as a origin.
-
getInLinks
Description copied from interface:INodeReturns a set of links that have this node as a target.- Specified by:
getInLinksin interfaceINode- Returns:
- a set of links that have this node as a target.
-
removeOutLink
Description copied from interface:INodeRemoves a link that has this node as an origin.- Specified by:
removeOutLinkin interfaceINode- Parameters:
link- a link that has this node as an origin.
-
removeInLink
Description copied from interface:INodeRemoves a link that has this node as a target.- Specified by:
removeInLinkin interfaceINode- Parameters:
link- a link that has this node as a target.
-
toString
-
toJSON
Description copied from interface:INodeReturns the JSON (RFC 8259) representation of the Node. -
equals
-
clone
-