Package opennlp.dl
Class InferenceOptions
java.lang.Object
opennlp.dl.InferenceOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintReturns whether tokenization should lower case the input text and strip accents, as required by uncased models.intbooleanisGpu()booleanbooleanvoidsetDocumentSplitSize(int documentSplitSize) voidsetGpu(boolean gpu) voidsetGpuDeviceId(int gpuDeviceId) voidsetIncludeAttentionMask(boolean includeAttentionMask) voidsetIncludeTokenTypeIds(boolean includeTokenTypeIds) voidsetLowerCase(boolean lowerCase) Sets whether tokenization should lower case the input text and strip accents.voidsetSplitOverlapSize(int splitOverlapSize)
-
Constructor Details
-
InferenceOptions
public InferenceOptions()
-
-
Method Details
-
isIncludeAttentionMask
public boolean isIncludeAttentionMask() -
setIncludeAttentionMask
public void setIncludeAttentionMask(boolean includeAttentionMask) -
isIncludeTokenTypeIds
public boolean isIncludeTokenTypeIds() -
setIncludeTokenTypeIds
public void setIncludeTokenTypeIds(boolean includeTokenTypeIds) -
isGpu
public boolean isGpu() -
setGpu
public void setGpu(boolean gpu) -
getGpuDeviceId
public int getGpuDeviceId() -
setGpuDeviceId
public void setGpuDeviceId(int gpuDeviceId) -
getDocumentSplitSize
public int getDocumentSplitSize() -
setDocumentSplitSize
public void setDocumentSplitSize(int documentSplitSize) -
getSplitOverlapSize
public int getSplitOverlapSize() -
setSplitOverlapSize
public void setSplitOverlapSize(int splitOverlapSize) -
getLowerCase
Returns whether tokenization should lower case the input text and strip accents, as required by uncased models.- Returns:
Boolean.TRUEfor uncased models,Boolean.FALSEfor cased models, ornullif not set, in which case each component applies the default that matches its commonly used models.
-
setLowerCase
public void setLowerCase(boolean lowerCase) Sets whether tokenization should lower case the input text and strip accents. Settruefor uncased models andfalsefor cased models. If not set, each component applies the default that matches its commonly used models.- Parameters:
lowerCase- Whether to lower case the input text during tokenization.
-