|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.core.Token
public class Token
This class represents a token of an input document. It contains:
Field Summary | |
---|---|
int |
colE
Ending column in the document. |
int |
colS
Starting column in the document. |
int |
lineE
Ending line in the document. |
int |
lineS
Starting line in the document. |
java.lang.String |
name
Name of token. |
short |
paragraph
Ordinal number of paragraph, in which the token occured. |
int |
reloffset
|
int |
sentence
Initialized by PunctFilter
and ParagraphPunctFilter |
short |
sentenceInParagraph
Ordinal number of sentence whitin the paragraph, in which the token occured. |
java.lang.String |
text
Text that is represented by this token. |
int |
weight
|
Constructor Summary | |
---|---|
Token(java.lang.String aname,
java.lang.String atext,
int ls,
int le,
int cs,
int ce)
Constructor for the Token object |
|
Token(java.lang.String aname,
java.lang.String atext,
int ls,
int le,
int cs,
int ce,
int reloff)
Constructor for the Token object |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Description of the Method |
TextUnitID |
getTextUnit(long uid,
int revision)
Returns the identificator of the text unit to which the token falls into. |
int |
hashCode()
Description of the Method |
Token |
newText(java.lang.String name,
java.lang.String text)
Clones this objects with a new name and text. |
java.lang.String |
toString()
Convert a Token to a String.Returns the string that represents a token of a given name and text. |
static java.lang.String |
toString(java.lang.String name,
java.lang.String text)
Convert a Token to a String.Returns the string that represents a token of a given name and text. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String text
public java.lang.String name
<WORD>
,
<NUM>
.
public int lineS
public int lineE
public int colS
public int colE
public int weight
public int reloffset
public int sentence
PunctFilter
and ParagraphPunctFilter
public short paragraph
ParagraphPunctFilter
public short sentenceInParagraph
ParagraphPunctFilter
Constructor Detail |
---|
public Token(java.lang.String aname, java.lang.String atext, int ls, int le, int cs, int ce)
aname
- this object's nameatext
- the text associated with the tokenls
- the starting line in the documentle
- the ending line in the documentcs
- the starting column in the document.ce
- the ending column in the document.public Token(java.lang.String aname, java.lang.String atext, int ls, int le, int cs, int ce, int reloff)
aname
- this object's nameatext
- the text associated with the tokenls
- the starting line in the documentle
- the ending line in the documentcs
- the starting column in the documentce
- the ending column in the documentreloff
- the relative offset of this tokenMethod Detail |
---|
public static java.lang.String toString(java.lang.String name, java.lang.String text)
name
and text
variable values.
name
- the nametext
- the text
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Description of the Parameter
public java.lang.String toString()
name
and text
variable values.
toString
in class java.lang.Object
public Token newText(java.lang.String name, java.lang.String text)
name
- Description of the Parametertext
- Description of the Parameter
public TextUnitID getTextUnit(long uid, int revision)
uid
- id of the document to which the token falls intorevision
- revision number of the document to which the token falls into
TextUnitID
child classes
- DocumentUnitID
,
ParagraphUnitID
or
SentenceUnitID
Constants.CHECK_DUPLICITY_LEVEL
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |