Skip to content

Commit

Permalink
🐛 Fixing vocab_path typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrikerMan committed Mar 29, 2020
1 parent 7ef6440 commit 878237d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ pip show kashgari

## Current Release

### [1.1.3] - 2020.03.28

- 🐛 Fixing vocab_path typo.

### [1.1.2] - 2020.03.27

- ✨ Add save best model callback `KashgariModelCheckpoint`.
Expand Down
6 changes: 3 additions & 3 deletions docs/embeddings/bert-embedding_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ from kashgari.tokenizer import BertTokenizer
model_folder = '/Users/brikerman/Desktop/nlp/language_models/albert_base'
checkpoint_path = os.path.join(model_folder, 'model.ckpt-best')
config_path = os.path.join(model_folder, 'albert_config.json')
vacab_path = os.path.join(model_folder, 'vocab_chinese.txt')
vocab_path = os.path.join(model_folder, 'vocab_chinese.txt')

tokenizer = BertTokenizer.load_from_vacab_file(vacab_path)
embed = BERTEmbeddingV2(vacab_path, config_path, checkpoint_path,
tokenizer = BertTokenizer.load_from_vacob_file(vocab_path)
embed = BERTEmbeddingV2(vocab_path, config_path, checkpoint_path,
bert_type='albert',
task=kashgari.CLASSIFICATION,
sequence_length=100)
Expand Down
2 changes: 1 addition & 1 deletion kashgari/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# file: __version__.py.py
# time: 2019-05-20 16:32

__version__ = '1.1.2'
__version__ = '1.1.3'
7 changes: 4 additions & 3 deletions tests/embedding/test_bert_embedding_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ def test_basic_use(self):

checkpoint_path = os.path.join(model_folder, 'model.ckpt-best')
config_path = os.path.join(model_folder, 'albert_config.json')
vacab_path = os.path.join(model_folder, 'vocab_chinese.txt')
vocab_path = os.path.join(model_folder, 'vocab_chinese.txt')

tokenizer = BertTokenizer.load_from_vacab_file(vacab_path)
embed = BERTEmbeddingV2(vacab_path, config_path, checkpoint_path,
tokenizer = BertTokenizer.load_from_vacab_file(vocab_path)
tokenizer = BertTokenizer.load_from_vocab_file(vocab_path)
embed = BERTEmbeddingV2(vocab_path, config_path, checkpoint_path,
bert_type='albert',
task=kashgari.CLASSIFICATION,
sequence_length=100)
Expand Down

0 comments on commit 878237d

Please sign in to comment.