提交 8591e70b 编写于 作者: T Tao Luo 提交者: GitHub

Merge pull request #898 from zhangjcqq/develop

fix a index bug
...@@ -43,13 +43,13 @@ def extract_dict_features(pair_file, feature_file): ...@@ -43,13 +43,13 @@ def extract_dict_features(pair_file, feature_file):
mark[verb_index] = 1 mark[verb_index] = 1
ctx_0 = sentence_list[verb_index] ctx_0 = sentence_list[verb_index]
if verb_index < len(labels_list) - 2: if verb_index < len(labels_list) - 1:
mark[verb_index + 1] = 1 mark[verb_index + 1] = 1
ctx_p1 = sentence_list[verb_index + 1] ctx_p1 = sentence_list[verb_index + 1]
else: else:
ctx_p1 = 'eos' ctx_p1 = 'eos'
if verb_index < len(labels_list) - 3: if verb_index < len(labels_list) - 2:
mark[verb_index + 2] = 1 mark[verb_index + 2] = 1
ctx_p2 = sentence_list[verb_index + 2] ctx_p2 = sentence_list[verb_index + 2]
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册