mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
parent
30ea8f929e
commit
0489a6979e
@ -64,7 +64,7 @@ class Dataset(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def vocab_size(self):
|
def vocab_size(self):
|
||||||
"""vocabuary size"""
|
"""vocabulary size"""
|
||||||
return max(self.word2id_dict.values()) + 1
|
return max(self.word2id_dict.values()) + 1
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -97,4 +97,4 @@ class Dataset(object):
|
|||||||
word_ids = self.word_to_ids(words)
|
word_ids = self.word_to_ids(words)
|
||||||
return word_ids
|
return word_ids
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user