public class Token extends Object implements Concept, Comparable, SortedElement
Token is a cute unit data structure for handling nlp task or other operations
Copyright: Copyright (c) 2005
Company: IST, Drexel University
TYPE_PHRASE, TYPE_TERM, TYPE_TOKEN| Constructor and Description |
|---|
Token(int index,
int frequency) |
Token(String value) |
Token(String value,
int index,
int frequency) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFrequency(int inc) |
int |
compareTo(Object obj) |
int |
compareTo(Token token) |
Concept |
copy() |
boolean |
equals(Object obj) |
boolean |
equalTo(Concept concept) |
int |
getConceptType()
Return 1 for ontological term, 2 for multiword phrase, and 3 for token
|
Word |
getEndingWord()
Gets the last word of the concept.
|
String |
getEntryID() |
int |
getFrequency() |
int |
getIndex() |
Object |
getMemo() |
String |
getName() |
String |
getSemanticType() |
Word |
getStartingWord()
Gets the first word of the concept.
|
String |
getValue() |
double |
getWeight() |
int |
hashCode() |
boolean |
isSubConcept() |
void |
setFrequency(int freq) |
void |
setIndex(int index) |
void |
setMemo(Object memo) |
void |
setValue(String value) |
void |
setWeight(double weight) |
String |
toString() |
public Token(String value)
public Token(int index,
int frequency)
public Token(String value, int index, int frequency)
public int getConceptType()
ConceptgetConceptType in interface Conceptpublic String getName()
public String getEntryID()
getEntryID in interface Conceptpublic String getSemanticType()
getSemanticType in interface Conceptpublic boolean isSubConcept()
isSubConcept in interface Conceptpublic Word getStartingWord()
ConceptgetStartingWord in interface Conceptpublic Word getEndingWord()
ConceptgetEndingWord in interface Conceptpublic String getValue()
public void setValue(String value)
public void setFrequency(int freq)
setFrequency in interface FrequencySortablesetFrequency in interface Conceptpublic void addFrequency(int inc)
addFrequency in interface Conceptpublic int getFrequency()
getFrequency in interface FrequencySortablegetFrequency in interface Conceptpublic int getIndex()
getIndex in interface IndexSortablegetIndex in interface Conceptpublic void setIndex(int index)
setIndex in interface IndexSortablesetIndex in interface Conceptpublic void setWeight(double weight)
setWeight in interface WeightSortablesetWeight in interface Conceptpublic double getWeight()
getWeight in interface WeightSortablegetWeight in interface Conceptpublic int compareTo(Object obj)
compareTo in interface Comparablepublic int compareTo(Token token)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.