nikitakit / self-attentive-parser

High-accuracy NLP parser with models for 11 languages.
https://parser.kitaev.io/
MIT License
871 stars 153 forks source link

decode() takes exactly 6 positional arguments (5 given) #46

Closed HongyanJiao closed 5 years ago

HongyanJiao commented 5 years ago

Training... main() File "src/main.py", line 608, in main args.callback(args) File "src/main.py", line 564, in subparser.set_defaults(callback=lambda args: run_train(args, hparams)) File "src/main.py", line 312, in runtrain , loss = parser.parse_batch(subbatch_sentences, subbatch_trees) File "/home/test/project/self-attentive-parser-master/src/parse_nk.py", line 1095, in parse_batch p_i, p_j, p_label, p_augment, g_i, g_j, g_label = self.parse_from_annotations(fencepost_annotations_start[start:end,:], fencepost_annotations_end[start:end,:], sentences[i], golds[i]) File "/home/test/project/self-attentive-parser-master/src/parse_nk.py", line 1148, in parse_from_annotations p_score, p_i, p_j, p_label, p_augment = chart_helper.decode(False, **decoder_args) File "chart_helper.pyx", line 11, in chart_helper.decode (/home/test/.pyxbld/temp.linux-x86_64-3.6/pyrex/chart_helper.c:1674) def decode(int force_gold, int sentence_len, np.ndarray[DTYPE_t, ndim=3] label_scores_chart, int is_train, gold, label_vocab): TypeError: decode() takes exactly 6 positional arguments (5 given)