public static class SentenceTransformer.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowMultithreading |
protected LabelAwareIterator |
iterator |
protected boolean |
readOnly |
protected TokenizerFactory |
tokenizerFactory |
protected VocabCache<VocabWord> |
vocabCache |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SentenceTransformer.Builder |
allowMultithreading(boolean reallyAllow)
This method enables/disables parallel processing over sentences
|
SentenceTransformer |
build() |
SentenceTransformer.Builder |
iterator(DocumentIterator iterator) |
SentenceTransformer.Builder |
iterator(LabelAwareIterator iterator) |
SentenceTransformer.Builder |
iterator(SentenceIterator iterator) |
SentenceTransformer.Builder |
readOnly(boolean readOnly) |
SentenceTransformer.Builder |
tokenizerFactory(TokenizerFactory tokenizerFactory) |
protected TokenizerFactory tokenizerFactory
protected LabelAwareIterator iterator
protected VocabCache<VocabWord> vocabCache
protected boolean readOnly
protected boolean allowMultithreading
public SentenceTransformer.Builder tokenizerFactory(@NonNull TokenizerFactory tokenizerFactory)
public SentenceTransformer.Builder iterator(@NonNull LabelAwareIterator iterator)
public SentenceTransformer.Builder iterator(@NonNull SentenceIterator iterator)
public SentenceTransformer.Builder iterator(@NonNull DocumentIterator iterator)
public SentenceTransformer.Builder readOnly(boolean readOnly)
public SentenceTransformer.Builder allowMultithreading(boolean reallyAllow)
reallyAllow
- public SentenceTransformer build()