我正在尝试从 SpaCy 的字符串存储中获取一些英语单词的哈希值。
nlp = English()
doc1 = nlp('this is doc1')
id = doc1.vocab.strings['Saurabh']
print(id)
# output, it has given hash code
id1 = doc1.vocab.strings['समाचार']
# This is a hindi word so i do not expect it to be a part of English,
# so it shoud throw an error.
print(id1)
# output, it given hash code
为什么这在(至少)第二行没有给出错误?