Package edu.fiu.jtlex
Class Term
java.lang.Object
edu.fiu.jtlex.Term
public class Term extends java.lang.Object implements ITerm
- Author:
- arada002
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.fiu.jtlex.ITerm
ITerm.NamedEntity, ITerm.PartOfSpeech -
Constructor Summary
Constructors Constructor Description Term(int id, java.lang.String lemma, java.lang.String frameSet, java.lang.String text, int begin, int end, int elementId, java.lang.String timexText, ITerm.NamedEntity namedEntity, java.lang.String normalizedNER, edu.fiu.jtlex.data.ITimex.TimexType timexType, int tid)Creates a new Term with the specified information. -
Method Summary
Modifier and Type Method Description intgetBegin()Word’s first character position within text.intgetElementId()Contains id of element (Can be verbs, nouns, clauses, sentences).intgetEnd()Word’s last character position within text.java.lang.StringgetFrameSet()Composed of the lemma and the sense associated with it (Can check Wordnet).intgetId()Each term has to be identified by a unique ID number.java.lang.StringgetLemma()Each head of the main term in the noun phrase.ITerm.NamedEntitygetNamedEntity()Marks the Term as an Entity type.java.lang.StringgetNormalizedNER()Normalized text after annotated by NER.java.lang.StringgetText()Text being referred to by term.intgetTid()Each timex has to be identified by a unique ID number.java.lang.StringgetTimexText()Each timex has text associated with it.edu.fiu.jtlex.data.ITimex.TimexTypegetTimexType()This value is not optional.
-
Constructor Details
-
Term
public Term(int id, java.lang.String lemma, java.lang.String frameSet, java.lang.String text, int begin, int end, int elementId, java.lang.String timexText, ITerm.NamedEntity namedEntity, java.lang.String normalizedNER, edu.fiu.jtlex.data.ITimex.TimexType timexType, int tid)Creates a new Term with the specified information.- Parameters:
id- id of the Term, generated as unique identity for the node within the graph; may not be negativelemma- head of the main term in the noun phraseframeSet- lemma and sense of lemma (Can be seen in WordNet)text- the textual content of the nodebegin- word’s first character position within textend- word’s last character position within textelementId- id of the element (verbs, nouns, clauses, sentences)timexText- text of the timexnamedEntity- the Stanford CoreNLP Entity Tag associated with the TermnormalizedNER- normalized text after passed through NER (Named-Entity-Recognizer) annotatertimexType- the type of the timex; may not be nulltid- id of the timex; may not be negative
-
-
Method Details
-
getId
public int getId()Description copied from interface:ITermEach term has to be identified by a unique ID number. This value is not optional. Returns the id of the term. -
getLemma
public java.lang.String getLemma()Description copied from interface:ITermEach head of the main term in the noun phrase. Returns the main term as a string. -
getFrameSet
public java.lang.String getFrameSet()Description copied from interface:ITermComposed of the lemma and the sense associated with it (Can check Wordnet). Returns the lemma and sense seperated by a '.'.- Specified by:
getFrameSetin interfaceITerm- Returns:
- frameSet string may not be null
-
getText
public java.lang.String getText()Description copied from interface:ITermText being referred to by term. Returns the text. -
getBegin
public int getBegin()Description copied from interface:ITermWord’s first character position within text. Returns the integer position of first character. -
getEnd
public int getEnd()Description copied from interface:ITermWord’s last character position within text. Returns the integer position of last character. -
getElementId
public int getElementId()Description copied from interface:ITermContains id of element (Can be verbs, nouns, clauses, sentences). Returns the id of element.- Specified by:
getElementIdin interfaceITerm- Returns:
- elementId integer may not be negative
-
getTimexText
public java.lang.String getTimexText()Description copied from interface:ITermEach timex has text associated with it. Returns the text tied to the timex.- Specified by:
getTimexTextin interfaceITerm- Returns:
- timexText string may not be null
-
getNamedEntity
Description copied from interface:ITermMarks the Term as an Entity type. Returns the type to which the term belongs.- Specified by:
getNamedEntityin interfaceITerm- Returns:
- NamedEntity enum may not be null.
-
getNormalizedNER
public java.lang.String getNormalizedNER()Description copied from interface:ITermNormalized text after annotated by NER. Returns the NER annotated text.- Specified by:
getNormalizedNERin interfaceITerm- Returns:
- normalizedNER string may not be null
-
getTimexType
public edu.fiu.jtlex.data.ITimex.TimexType getTimexType()Description copied from interface:ITermThis value is not optional. Returns the timex type to which the object belongs.- Specified by:
getTimexTypein interfaceITerm- Returns:
- TimexType enum may not be null.
-
getTid
public int getTid()Description copied from interface:ITermEach timex has to be identified by a unique ID number. This value is not optional. Returns the integer part of the timexId.
-