nikitakit / self-attentive-parser

High-accuracy NLP parser with models for 11 languages.

Home Page:https://parser.kitaev.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

HongyanJiao opened this issue · comments

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 run_train
_, 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)