de.fu_berlin.ties.extract.amend
Class ContextDetails
java.lang.Object
de.fu_berlin.ties.text.TokenDetails
de.fu_berlin.ties.extract.amend.ContextDetails
- Direct Known Subclasses:
- TrainingContextDetails
public class ContextDetails
- extends TokenDetails
Extends the TokenDetails
class by also storing
the context of a token. Instances of this class are immutable and thus
thread-safe.
- Version:
- $Revision: 1.2 $, $Date: 2004/11/19 14:04:51 $, $Author: siefkes $
- Author:
- Christian Siefkes
ContextDetails
public ContextDetails(String theToken,
int tokenRep,
int tokenIndex,
boolean wsBefore,
FeatureVector features)
- Creates a new instance.
- Parameters:
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
ContextDetails
public ContextDetails(TokenDetails orgDetails,
FeatureVector features)
- Creates a new instance, re-using field values from a
TokenDetails
instance.
- Parameters:
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
getContext
public FeatureVector getContext()
- Returns a feature vector representing the context of the token.
- Returns:
- the value of the attribute
Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.