IBM / transition-amr-parser

SoTA Abstract Meaning Representation (AMR) parsing with word-node alignments in Pytorch. Includes checkpoints and other tools such as statistical significance Smatch.
Apache License 2.0
246 stars 48 forks source link

Question about decoding with pre-trained model by command line in README #36

Closed cws7777 closed 1 year ago

cws7777 commented 2 years ago

Hi, I'm having a problem with decoding using pre-trained model. I followed the README.md for the installation, and testing for installation printed out "[OK] correctly installed" Then, I skipped the command line "bash tests/minimal_test.sh", and did typed command line amr-parse -c ./DATA/amr2joint_ontowiki2_g2g/models~~~~ -i plain_textfile.txt -o output.amr.

It gives me such an error (amr-parse: command not found) What did I miss here? or what should I do for setting up amr-parse command?

Thank you.

Best, Paul

ramon-astudillo commented 2 years ago

I am not sure I understand, did bash tests/minimal_test.sh work?

cws7777 commented 2 years ago

Yes it works fine, but the amr-parse coomand that is in README.md doesn't work for me..!

ramon-astudillo commented 2 years ago

did you put something inside set_environment.sh? if you activate any environment there you need to call this prior to amr-parse e.g.

. set_environment.sh
amr-parse <arguments>

also double check the installing of the modules work (it should have since the tests pass) i.e.

pip install --editable .
ramon-astudillo commented 2 years ago

for debugging purposes, amr-parse is just an entry point defined in the setup here https://github.com/IBM/transition-amr-parser/blob/master/setup.py#L33

Calling the script that is linked to that entry point python transition_amr_parser/parse.py <arguments> should be equivalent to calling amr-parse <arguments>