public final class SparseFeatureExtractorHelper<K> extends Object
| Constructor and Description |
|---|
SparseFeatureExtractorHelper(List<K> words,
List<Integer> labels,
SequenceFeatureExtractor<K> extractor)
Constructs this feature factory.
|
SparseFeatureExtractorHelper(List<K> words,
List<Integer> labels,
SequenceFeatureExtractor<K> extractor,
String[] dictionary)
Constructs this feature factory via a given dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getDictionary() |
de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> |
vectorize()
Vectorizes the given data from the constructor.
|
de.jungblut.math.DoubleVector |
vectorize(K word)
Vectorizes the given word.
|
de.jungblut.math.DoubleVector |
vectorize(K word,
Integer lastLabel)
Vectorizes the given word with the previous outcome.
|
de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> |
vectorize(List<K> words,
List<Integer> labels)
Vectorizes the given data.
|
de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> |
vectorizeAdditionals(List<K> words,
List<Integer> labels)
Vectorizes the given data.
|
de.jungblut.math.DoubleVector[] |
vectorizeEachLabel(List<K> words)
Vectorizes the given data for each label.
|
public SparseFeatureExtractorHelper(List<K> words, List<Integer> labels, SequenceFeatureExtractor<K> extractor)
words - a list of words in sequence to learn on.labels - the corresponding labels in parallel to the words.extractor - the core implementation of the feature extractor.public SparseFeatureExtractorHelper(List<K> words, List<Integer> labels, SequenceFeatureExtractor<K> extractor, String[] dictionary)
words - a list of words in sequence to learn on.labels - the corresponding labels in parallel to the words.extractor - the core implementation of the feature extractor.dictionary - an already given dictionary.public de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> vectorize()
vectorizeAdditionals(List, List).Tuple with the features in the first dimension, and on
the second the outcome.public de.jungblut.math.DoubleVector vectorize(K word)
public de.jungblut.math.DoubleVector vectorize(K word, Integer lastLabel)
public de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> vectorize(List<K> words, List<Integer> labels)
vectorize() or creates one on this data.Tuple with the features in the first dimension, and on
the second the outcome.public de.jungblut.math.tuple.Tuple<de.jungblut.math.DoubleVector[],de.jungblut.math.DoubleVector[]> vectorizeAdditionals(List<K> words, List<Integer> labels)
vectorize() or creates one on this data.Tuple with the features in the first dimension, and on
the second the outcome.public de.jungblut.math.DoubleVector[] vectorizeEachLabel(List<K> words)
vectorize() or creates one on this data.public String[] getDictionary()
Copyright © 2016. All rights reserved.