|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.text.TokenDetails
de.fu_berlin.ties.context.ContextDetails
public class ContextDetails
Extends the TokenDetails
class by also storing
the context of a token. Instances of this class are immutable and thus
thread-safe.
Constructor Summary | |
---|---|
ContextDetails(String theToken,
int tokenRep,
int tokenIndex,
boolean wsBefore,
FeatureVector features,
CombinationState combiState,
boolean isRelevant)
Creates a new instance. |
|
ContextDetails(TokenDetails orgDetails,
FeatureVector features,
CombinationState combiState,
boolean isRelevant)
Creates a new instance, re-using field values from a TokenDetails
instance. |
Method Summary | |
---|---|
FeatureVector |
getContext()
Returns a feature vector representing the context of the token. |
CombinationState |
getState()
Returns the combination state returned by the used CombinationStrategy for this token. |
boolean |
isRelevant()
Whether or not this context is relevant for classification. |
Methods inherited from class de.fu_berlin.ties.text.TokenDetails |
---|
getIndex, getRep, getToken, isWhitespaceBefore, setRep, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContextDetails(String theToken, int tokenRep, int tokenIndex, boolean wsBefore, FeatureVector features, CombinationState combiState, boolean isRelevant)
theToken
- the token to representtokenRep
- the repetition of the token in the document (counting
starts with 0, as the first occurrence is the "0th repetition")tokenIndex
- the index of the token in the document (counting
starts with 0 for the very first token)wsBefore
- whether there is whitespace before the main
token
(either at the end of left
or in the
preceding element)features
- a feature vector representing the context of the token;
actually, only the last transformation
of this vector is storedcombiState
- the combination state returned by the used
CombinationStrategy
for this tokenisRelevant
- whether or not this context is relevant for
classificationpublic ContextDetails(TokenDetails orgDetails, FeatureVector features, CombinationState combiState, boolean isRelevant)
TokenDetails
instance.
orgDetails
- an instance of the parent class whose member fields
are re-used to initialize this instancefeatures
- a feature vector representing the context of the token;
actually, only the last transformation
of this vector is storedcombiState
- the combination state returned by the used
CombinationStrategy
for this tokenisRelevant
- whether or not this context is relevant for
classificationMethod Detail |
---|
public FeatureVector getContext()
public CombinationState getState()
CombinationStrategy
for this token.
public boolean isRelevant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |