public class HeadingEncoder extends BagOfWordsEncoder
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
protected static org.slf4j.Logger |
log |
static String |
OTHER_CLASS |
language, preprocessor, wordHelperstotalWords, vocabid, model, modelAvailable, name, timer| Constructor and Description |
|---|
HeadingEncoder() |
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.api.ndarray.INDArray |
encode(Iterable<? extends Span> spans) |
org.nd4j.linalg.api.ndarray.INDArray |
encode(String phrase) |
protected org.nd4j.linalg.api.ndarray.INDArray |
encode(String[] words) |
protected org.nd4j.linalg.api.ndarray.INDArray |
encodeOtherClass() |
org.nd4j.linalg.api.ndarray.INDArray |
encodeSubsampled(String phrase) |
Collection<String> |
getNearestNeighbours(org.nd4j.linalg.api.ndarray.INDArray v,
int maxN) |
void |
trainModel(List<String> headlines,
int minWordFrequency,
int minWordLength,
WordHelpers.Language language) |
asString, encode, getConfidence, getFrequency, getIndex, getLanguage, getMaxConfidence, getName, getNearestNeighbour, getProbability, isUnknown, keepWord, samplingRate, samplingRate, setLanguage, subsample, subsampleWeights, trainModel, trainModel, trainModelgetEmbeddingVectorSize, getNearestNeighbours, getTotalWords, getWord, getWords, loadModel, oneHot, saveModel, setTotalWordsencodeEach, encodeEach, encodeEach, encodeMatrix, trainModelappendTestLog, appendTestLog, appendTrainLog, appendTrainLog, clearTestLog, clearTrainLog, getConf, getId, getModel, getTestLog, getTrainLog, isModelAvailable, isModelAvailableInChildren, setConf, setId, setModel, setModelAvailable, setModelFilename, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncoders, getId, isModelAvailable, setEncodersprotected static final org.slf4j.Logger log
public static final String ID
public static String OTHER_CLASS
public void trainModel(List<String> headlines, int minWordFrequency, int minWordLength, WordHelpers.Language language)
public org.nd4j.linalg.api.ndarray.INDArray encode(String phrase)
encode in interface IEncoderencode in class BagOfWordsEncoderpublic org.nd4j.linalg.api.ndarray.INDArray encode(Iterable<? extends Span> spans)
encode in interface IEncoderencode in class BagOfWordsEncoderprotected org.nd4j.linalg.api.ndarray.INDArray encode(String[] words)
encode in class BagOfWordsEncoderpublic org.nd4j.linalg.api.ndarray.INDArray encodeSubsampled(String phrase)
encodeSubsampled in class BagOfWordsEncoderprotected org.nd4j.linalg.api.ndarray.INDArray encodeOtherClass()
public Collection<String> getNearestNeighbours(org.nd4j.linalg.api.ndarray.INDArray v, int maxN)
getNearestNeighbours in class BagOfWordsEncoderCopyright © 2019. All rights reserved.