public static class TrainableWordEmbedding.Builder extends Embedding.BaseBuilder<java.lang.String,TrainableWordEmbedding.Builder>
TrainableWordEmbedding
.dataType, defaultItem, embeddingSize, embeddingType, fallthrough, sparseGrad, useDefault
Modifier and Type | Method and Description |
---|---|
TrainableWordEmbedding |
build()
Builds a new instance of
TrainableWordEmbedding based on the arguments in this
builder. |
TrainableWordEmbedding.Builder |
optUnknownToken(java.lang.String unknownToken)
Sets the optional
String value for the unknown token. |
protected TrainableWordEmbedding.Builder |
self()
Returns this {code Builder} object.
|
protected TrainableWordEmbedding.Builder |
setType(java.lang.Class<java.lang.String> embeddingType)
Creates a new
Embedding.BaseBuilder with the specified embedding type. |
TrainableWordEmbedding.Builder |
setVocabulary(Vocabulary vocabulary)
Sets the
Vocabulary to be used. |
getEmbeddingType, optDataType, optDefaultItem, optFallthrough, optSparseGrad, optUseDefault, setEmbeddingSize
public TrainableWordEmbedding.Builder setVocabulary(Vocabulary vocabulary)
Vocabulary
to be used.vocabulary
- the Vocabulary
to be setprotected TrainableWordEmbedding.Builder setType(java.lang.Class<java.lang.String> embeddingType)
Embedding.BaseBuilder
with the specified embedding type.setType
in class Embedding.BaseBuilder<java.lang.String,TrainableWordEmbedding.Builder>
embeddingType
- the embedding classEmbedding.BaseBuilder
class with the specified embedding typeprotected TrainableWordEmbedding.Builder self()
self
in class Embedding.BaseBuilder<java.lang.String,TrainableWordEmbedding.Builder>
BaseBuilder
public TrainableWordEmbedding.Builder optUnknownToken(java.lang.String unknownToken)
String
value for the unknown token.unknownToken
- the String
value of unknown tokenpublic TrainableWordEmbedding build()
TrainableWordEmbedding
based on the arguments in this
builder.TrainableWordEmbedding