public class FastTextRESTAdapter extends AbstractRESTAdapter
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECT_TIMEOUT |
static long |
DEFAULT_EMBEDDING_VECTOR_SIZE |
static int |
DEFAULT_READ_TIMEOUT |
static String |
SENTENCES_ENDPOINT |
static String |
URL_FORMAT |
HTTP_ACCEPT_TYPE_NAME, HTTP_CONTENT_TYPE_NAME, HTTP_REQUEST_METHOD| Constructor and Description |
|---|
FastTextRESTAdapter(String domain,
int port) |
FastTextRESTAdapter(String domain,
int port,
long embeddingVectorSize,
int connectTimeout,
int readTimeout) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
encodeImpl(String data) |
double[][] |
encodeImpl(String[] data) |
double[][][] |
encodeImpl(String[][] tokensOfDocument2D) |
DeserializationProvider |
getDeserializationProvider() |
SerializationProvider |
getSerializationProvider() |
URL |
getUrl(String path) |
configureConnection, encode, encode, encode, getConnection, getConnectTimeout, getEmbeddingVectorSize, getReadTimeout, request, setConnectTimeout, setEmbeddingVectorSize, setReadTimeoutpublic static final int DEFAULT_READ_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
public static final long DEFAULT_EMBEDDING_VECTOR_SIZE
public static final String URL_FORMAT
public static final String SENTENCES_ENDPOINT
public FastTextRESTAdapter(String domain, int port, long embeddingVectorSize, int connectTimeout, int readTimeout)
public FastTextRESTAdapter(String domain, int port)
public double[] encodeImpl(String data) throws IOException
encodeImpl in class AbstractRESTAdapterIOExceptionpublic double[][] encodeImpl(String[] data) throws IOException
encodeImpl in class AbstractRESTAdapterIOExceptionpublic double[][][] encodeImpl(String[][] tokensOfDocument2D) throws IOException
encodeImpl in class AbstractRESTAdapterIOExceptionpublic SerializationProvider getSerializationProvider()
getSerializationProvider in class AbstractRESTAdapterpublic DeserializationProvider getDeserializationProvider()
getDeserializationProvider in class AbstractRESTAdapterpublic URL getUrl(String path) throws MalformedURLException
MalformedURLExceptionCopyright © 2020. All rights reserved.