Module org.elasticsearch.xcore
Class NGramFeatureExtractor
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.preprocessing.customwordembedding.NGramFeatureExtractor
- All Implemented Interfaces:
FeatureExtractor
This provides an array of
FeatureValue for the given nGram size and dimensionId
Each feature value contains the average occurrence of an nGram and its "id". This id is determined via a custom hash (Hash32)
and the provided dimensionId-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NGramFeatureExtractor
public NGramFeatureExtractor(int nGrams, int dimensionId)
-
-
Method Details
-
extractFeatures
- Specified by:
extractFeaturesin interfaceFeatureExtractor
-