mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-24 03:59:23 +01:00
bug fix
This commit is contained in:
@@ -169,8 +169,8 @@ class MultiWOZVocab(object):
|
||||
if include_oov:
|
||||
if self._word2idx.get(word, None) is None:
|
||||
raise ValueError(
|
||||
'Unknown word: %s. Vocabulary should include oovs here.' %
|
||||
word)
|
||||
'Unknown word: %s. Vocabulary should include oovs here.'
|
||||
% word)
|
||||
return self._word2idx[word]
|
||||
else:
|
||||
word = '<unk>' if word not in self._word2idx else word
|
||||
|
||||
Reference in New Issue
Block a user