public class MxBertVocabulary
extends ai.djl.modality.nlp.bert.BertVocabulary
| Constructor and Description |
|---|
MxBertVocabulary() |
| Modifier and Type | Method and Description |
|---|---|
long |
getIndex(java.lang.String token) |
java.lang.String |
getToken(long index) |
static MxBertVocabulary |
parse(java.io.InputStream is)
Parses the vocabulary file and create
MxBertVocabulary. |
public static MxBertVocabulary parse(java.io.InputStream is)
MxBertVocabulary.is - the input InputStream of the vocabulary fileMxBertVocabularypublic long getIndex(java.lang.String token)
public java.lang.String getToken(long index)