mirror of https://github.com/explosion/spaCy.git
* Give value for assert
This commit is contained in:
parent
648d1fe3ed
commit
0c76143b72
|
@ -16,7 +16,7 @@ cdef load_tokenization(Vocab& vocab, dict bacov, token_rules):
|
||||||
cdef StringHash hashed
|
cdef StringHash hashed
|
||||||
for chunk, lex, tokens in token_rules:
|
for chunk, lex, tokens in token_rules:
|
||||||
hashed = hash_string(chunk, len(chunk))
|
hashed = hash_string(chunk, len(chunk))
|
||||||
assert vocab[hashed] == 0
|
assert vocab[hashed] == 0, chunk
|
||||||
word = _add(vocab, bacov, <Splitter>NULL, hashed, lex, len(lex), len(lex))
|
word = _add(vocab, bacov, <Splitter>NULL, hashed, lex, len(lex), len(lex))
|
||||||
for i, lex in enumerate(tokens):
|
for i, lex in enumerate(tokens):
|
||||||
token_string = '%s:@:%d:@:%s' % (chunk, i, lex)
|
token_string = '%s:@:%d:@:%s' % (chunk, i, lex)
|
||||||
|
|
Loading…
Reference in New Issue