Browse Source

bug fix

master
ly119399 3 years ago
parent
commit
6f8910dbcb
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modelscope/utils/nlp/space/utils.py

+ 2
- 2
modelscope/utils/nlp/space/utils.py View File

@@ -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


Loading…
Cancel
Save