1e50a6606c5215e0dc28d016bb5f57bd668f47af,src/gluonnlp/vocab/bert.py,BERTVocab,from_json,#Any#Any#,177
Before Change
bert_vocab._sep_token = vocab_dict.get("sep_token")
bert_vocab._cls_token = vocab_dict.get("cls_token")
return bert_vocab
@classmethod
def from_sentencepiece(cls,
path,
After Change
t for t in reserved_tokens if t not in special_tokens
]
return cls(counter=count_tokens(token_to_idx.keys()),
unknown_token=unknown_token,
reserved_tokens=reserved_tokens,
token_to_idx=token_to_idx,
**identifiers_to_tokens)
@classmethod
def from_sentencepiece(cls,
path,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: dmlc/gluon-nlp
Commit Name: 1e50a6606c5215e0dc28d016bb5f57bd668f47af
Time: 2019-06-06
Author: lausen@amazon.com
File Name: src/gluonnlp/vocab/bert.py
Class Name: BERTVocab
Method Name: from_json
Project Name: ray-project/ray
Commit Name: ce96b03b07a4a4bdd851aa84493c616cd291aff2
Time: 2020-10-06
Author: sven@anyscale.io
File Name: rllib/models/torch/torch_modelv2.py
Class Name: TorchModelV2
Method Name: variables
Project Name: deepmipt/DeepPavlov
Commit Name: c672738b39c8f739551da0d88991a2fedfba3e14
Time: 2018-10-04
Author: puleon@mail.ru
File Name: deeppavlov/core/data/simple_vocab.py
Class Name: SimpleVocabulary
Method Name: items