public class FeatureCreatorUtil extends Object
Constructor and Description |
---|
FeatureCreatorUtil() |
Modifier and Type | Method and Description |
---|---|
static DiscreteFeature |
createFeatureFromArray(String[] pieces) |
static IntPair |
getWindowSpan(Constituent c,
int windowStart,
int windowEnd,
boolean ignoreSentenceBoundaries)
adjust initial window start/end based on how far word context extends in terms of the
underlying text/sentence (depending on ignoreSentenceBoundaries flag).
|
public static DiscreteFeature createFeatureFromArray(String[] pieces)
public static IntPair getWindowSpan(Constituent c, int windowStart, int windowEnd, boolean ignoreSentenceBoundaries)
c
- Constituent at "center" of windowwindowStart
- desired relative start offsetwindowEnd
- desired relative end offsetignoreSentenceBoundaries
- if 'true', allow window to extend past a sentence boundary
iff there are tokens at the relevant indexes.Copyright © 2017. All rights reserved.