IN
- The type of the items in the PaddedList from which features
are extractedpublic abstract class FeatureFactory<IN> extends Object implements Serializable
Clique
s
that you would want to make features over. It contains a
convenient method, getCliques(maxLeft, maxRight) which will give
you all the cliques within the specified limits.Modifier and Type | Field and Description |
---|---|
static Clique |
cliqueC |
static Clique |
cliqueCnC |
static Clique |
cliqueCp2C |
static Clique |
cliqueCp3C |
static Clique |
cliqueCp4C |
static Clique |
cliqueCp5C |
static Clique |
cliqueCpC |
static Clique |
cliqueCpCnC |
static Clique |
cliqueCpCp2C |
static Clique |
cliqueCpCp2Cp3C |
static Clique |
cliqueCpCp2Cp3Cp4C |
static Clique |
cliqueCpCp2Cp3Cp4Cp5C |
protected SeqClassifierFlags |
flags |
static List<Clique> |
knownCliques |
Constructor and Description |
---|
FeatureFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAllInterningAndSuffixing(Collection<String> accumulator,
Collection<String> addend,
String suffix)
Makes more complete feature names out of partial feature names, by
adding a suffix to the String feature name, adding results to an
accumulator
|
abstract Collection<String> |
getCliqueFeatures(PaddedList<IN> info,
int position,
Clique clique)
This method returns a
Collection of the features
calculated for the word at the specified position in info (the list of
words) for the specified Clique . |
List<Clique> |
getCliques() |
static List<Clique> |
getCliques(int maxLeft,
int maxRight) |
protected String |
getWord(CoreLabel label)
Convenience methods for subclasses which use CoreLabel.
|
void |
init(SeqClassifierFlags flags) |
protected SeqClassifierFlags flags
public static final Clique cliqueC
public static final Clique cliqueCpC
public static final Clique cliqueCp2C
public static final Clique cliqueCp3C
public static final Clique cliqueCp4C
public static final Clique cliqueCp5C
public static final Clique cliqueCpCp2C
public static final Clique cliqueCpCp2Cp3C
public static final Clique cliqueCpCp2Cp3Cp4C
public static final Clique cliqueCpCp2Cp3Cp4Cp5C
public static final Clique cliqueCnC
public static final Clique cliqueCpCnC
public void init(SeqClassifierFlags flags)
public abstract Collection<String> getCliqueFeatures(PaddedList<IN> info, int position, Clique clique)
Collection
of the features
calculated for the word at the specified position in info (the list of
words) for the specified Clique
.
It should return the actual String features, NOT wrapped in any
other object, as the wrapping
will be done automatically.
Because it takes a PaddedList
you don't
need to worry about indices which are outside of the list.info
- A PaddedList of the feature-value pairsposition
- The current position to extract features atclique
- The particular clique for which to extract features. It
should be a member of the knownCliques list.Collection
of the features
calculated for the word at the specified position in info.protected void addAllInterningAndSuffixing(Collection<String> accumulator, Collection<String> addend, String suffix)
accumulator
- The output features are added hereaddend
- The base set of featuressuffix
- The suffix added to each feature in the addend setprotected String getWord(CoreLabel label)
label
- A CoreLabel