public class NormalizedField extends SimpleLayeredSequence
SpanExtraction that has been
normalized in some way, e.g. morphological normalization. A normalized field
is a SimpleLayeredSequence with two layers: a token layer, and a POS
layer. The token layer contains the normalized words. The POS layer contains
the POS tags for those words.| Modifier and Type | Field and Description |
|---|---|
static String |
POS_LAYER |
static String |
TOKEN_LAYER |
| Constructor and Description |
|---|
NormalizedField(ChunkedExtraction original,
List<String> tokens,
List<String> posTags) |
NormalizedField(ChunkedExtraction original,
String[] tokens,
String[] posTags) |
| Modifier and Type | Method and Description |
|---|---|
ChunkedExtraction |
getOriginalField() |
List<String> |
getPosTags() |
String |
getPosTagsAsString() |
List<String> |
getTokens() |
String |
getTokensAsString() |
String |
toString()
Returns the tokens joined by spaces.
|
addLayer, addLayer, addLayer, equals, get, getLayer, getLayerAsString, getLayerAsString, getLayerAsString, getLayerNames, getLength, getNumLayers, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, hasLayerpublic static final String TOKEN_LAYER
public static final String POS_LAYER
public NormalizedField(ChunkedExtraction original, String[] tokens, String[] posTags) throws SequenceException
original - the original extractionstokens - the normalized tokensposTags - the POS tagsSequenceException - if tokens and posTags are not the same lengthpublic NormalizedField(ChunkedExtraction original, List<String> tokens, List<String> posTags) throws SequenceException
original - the original extractionstokens - the normalized tokensposTags - the POS tagsSequenceException - if tokens and posTags are not the same lengthpublic ChunkedExtraction getOriginalField()
public String getTokensAsString()
public String getPosTagsAsString()
Copyright © 2010-2013 University of Washington CSE. All Rights Reserved.