assert numFeatures == 0, "Features not implemented"
if len(featuresVocabs) == 0 and numFeatures > 0:
error("Features not implemented")
for j in range(numFeatures):
featuresVocabs[j] = onmt.Dict(
{onmt.Constants.PAD_WORD, onmt.Constants.UNK_WORD,
onmt.Constants.BOS_WORD, onmt.Constants.EOS_WORD})
After Change
assert numFeatures == 0, "Features not implemented"
if len(featuresVocabs) == 0 and numFeatures > 0:
raise RuntimeError("Features not implemented")
for j in range(numFeatures):
featuresVocabs[j] = onmt.Dict(
{onmt.Constants.PAD_WORD, onmt.Constants.UNK_WORD,
onmt.Constants.BOS_WORD, onmt.Constants.EOS_WORD})