public class PositionFeature extends SingleFeature
| Modifier and Type | Field and Description |
|---|---|
static String |
AFTER |
static String |
BEFORE |
static String |
ON |
includeArgs, indexcounter, indices, name, POSPrefix, predMaxIndex| Modifier | Constructor and Description |
|---|---|
protected |
PositionFeature(String POSPrefix) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeatures(Collection<Integer> indices,
Predicate pred,
Word arg,
Integer offset,
boolean allWords) |
void |
addFeatures(Sentence s,
Collection<Integer> indices,
int predIndex,
int argIndex,
Integer offset,
boolean allWords) |
String |
getFeatureString(Predicate pred,
Word arg) |
String |
getFeatureString(Sentence s,
int predIndex,
int argIndex) |
protected void |
performFeatureExtraction(Sentence s,
boolean allWords)
This method works with features that have includeArgs==false.
|
addMap, addPOSPrefix, doExtractFeatures, extractFeatures, getMap, getName, indexOf, setDoneWithPredFeatureExtraction, size, toStringpublic static final String BEFORE
public static final String ON
public static final String AFTER
protected PositionFeature(String POSPrefix)
public void addFeatures(Sentence s, Collection<Integer> indices, int predIndex, int argIndex, Integer offset, boolean allWords)
addFeatures in class SingleFeaturepublic void addFeatures(Collection<Integer> indices, Predicate pred, Word arg, Integer offset, boolean allWords)
addFeatures in class SingleFeatureprotected void performFeatureExtraction(Sentence s, boolean allWords)
SingleFeatureperformFeatureExtraction in class SingleFeaturepublic String getFeatureString(Sentence s, int predIndex, int argIndex)
getFeatureString in class SingleFeaturepublic String getFeatureString(Predicate pred, Word arg)
getFeatureString in class SingleFeatureCopyright © 2016. All rights reserved.