|
||||||||||
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.extract.amend.ContextDetails
de.fu_berlin.ties.extract.amend.TrainingContextDetails
public class TrainingContextDetails
Extends the ContextDetails
class by
also storing the expected (true) and predicted state on of a token.
Instances of this class are immutable and thus thread-safe.
Constructor Summary | |
---|---|
TrainingContextDetails(String theToken,
int tokenRep,
int tokenIndex,
boolean wsBefore,
FeatureVector features,
CombinationState predicted,
CombinationState expected)
Creates a new instance. |
|
TrainingContextDetails(TokenDetails orgDetails,
FeatureVector features,
CombinationState predicted,
CombinationState expected)
Creates a new instance, re-using field values from a TokenDetails
instance. |
Method Summary | |
---|---|
CombinationState |
getExpectedState()
Returns the expected (true) CombinationState for this
instance. |
CombinationState |
getPredictedState()
Returns the CombinationState predicted by the current
classification model for this token if there was an classification error;
or null if the expected state was correctly predicted. |
Methods inherited from class de.fu_berlin.ties.extract.amend.ContextDetails |
---|
getContext |
Methods inherited from class de.fu_berlin.ties.text.TokenDetails |
---|
getIndex, getRep, getToken, isWhitespaceBefore, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TrainingContextDetails(String theToken, int tokenRep, int tokenIndex, boolean wsBefore, FeatureVector features, CombinationState predicted, CombinationState expected)
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 tokenpredicted
- the CombinationState
predicted by the
current classification model for this token if there was an
classification error; or null
if the expected state was
correctly predictedexpected
- the expected (true) CombinationState
for
this tokenpublic TrainingContextDetails(TokenDetails orgDetails, FeatureVector features, CombinationState predicted, CombinationState expected)
TokenDetails
instance.
orgDetails
- an instance of the "grandparent" class whose member
fields are re-used to initialize this instancefeatures
- a feature vector representing the context of the tokenpredicted
- the CombinationState
predicted by the
current classification model for this token if there was an
classification error; or null
if the expected state was
correctly predictedexpected
- the expected (true) CombinationState
for
this tokenMethod Detail |
---|
public CombinationState getExpectedState()
CombinationState
for this
instance.
public CombinationState getPredictedState()
CombinationState
predicted by the current
classification model for this token if there was an classification error;
or null
if the expected state was correctly predicted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |