Closed mdtux89 closed 7 years ago
Yes. You could train the parser using the following command:
python amr_parsing.py -m train --model path_to_save_model --iter N [-d path_to_amr_dev_file] --amrfmt path_to_amr_training_file > log/train.log
But before you start training the parser, make sure you get all the preprocess files and the aligned amr file ready.
Chuan
Thanks!
For preprocess files you mean running this
python amr_parsing.py -m preprocess [input_sentence_file]
on the sentences, right?
Yes.
Hi Chuan, I can't save the trained model because of this exception (which is raised in model.py at line 338): Saving model error <type 'exceptions.ValueError'>
Do you have any idea of what causes this problem?
Marco
Hey, It would be great if anyone could share a solution to the saving model error. Thanks
From what I could gather, it's a python bug that is fixed only in python 3.0.
http://bugs.python.org/issue11564
They were discussing it here too: https://github.com/numpy/numpy/issues/2396
I've updated the parser to the newest version, which should not have saving model error. The problem is python2's bug, however it turns out the initial shape of the weight matrix is too big and the current version use a small initial parameter.
Thanks for the update
Hey would it be possible to update the readme?
@IceIceRabbit Hi, I've update the readme, feel free to comment for further problems.
Hi, is there a way to train the parser on a different dataset? Thanks, Marco