public class BertRESTEncoder extends AbstractRESTEncoder
restAdapterenableCacheid, log, model, modelAvailable, name, timer| Modifier | Constructor and Description |
|---|---|
protected |
BertRESTEncoder() |
|
BertRESTEncoder(RESTAdapter restAdapter) |
| Modifier and Type | Method and Description |
|---|---|
static BertRESTEncoder |
create(String domain,
int port,
int embeddingDimension) |
org.nd4j.linalg.api.ndarray.INDArray |
encode(Span span) |
org.nd4j.linalg.api.ndarray.INDArray |
encode(String word) |
ArrayList<double[][][]> |
encodeDocumentsParallel(Collection<Document> documents,
int maxSequenceLength,
org.nd4j.linalg.api.ndarray.INDArray toFill) |
org.nd4j.linalg.api.ndarray.INDArray |
encodeDocumentsParallelNoTokenization(List<Document> documents,
int maxSequenceLength) |
org.nd4j.linalg.api.ndarray.INDArray |
encodeMatrix(List<Document> input,
int maxTimeSteps,
Class<? extends Span> timeStepClass) |
getEmbeddingVectorSize, getRestAdapter, loadModel, saveModel, setRestAdapter, trainModel, trainModelencode, encodeEach, encodeEach, encodeEach, isCachingEnabled, setCachingEnabledappendTestLog, appendTestLog, appendTrainLog, appendTrainLog, clearTestLog, clearTrainLog, getConf, getId, getModel, getName, getTestLog, getTrainLog, isModelAvailable, isModelAvailableInChildren, setConf, setId, setModel, setModelAvailable, setModelFilename, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncoders, getId, getName, isModelAvailable, setEncodersprotected BertRESTEncoder()
public BertRESTEncoder(RESTAdapter restAdapter)
public static BertRESTEncoder create(String domain, int port, int embeddingDimension)
public org.nd4j.linalg.api.ndarray.INDArray encode(String word)
public org.nd4j.linalg.api.ndarray.INDArray encode(Span span)
public org.nd4j.linalg.api.ndarray.INDArray encodeMatrix(List<Document> input, int maxTimeSteps, Class<? extends Span> timeStepClass)
encodeMatrix in class Encoderpublic org.nd4j.linalg.api.ndarray.INDArray encodeDocumentsParallelNoTokenization(List<Document> documents, int maxSequenceLength)
public ArrayList<double[][][]> encodeDocumentsParallel(Collection<Document> documents, int maxSequenceLength, org.nd4j.linalg.api.ndarray.INDArray toFill) throws InterruptedException
InterruptedExceptionCopyright © 2020. All rights reserved.