Coder Social home page Coder Social logo

amrica's People

Contributors

nsaphra avatar shibhansh avatar wadkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amrica's Issues

error in dependency

I am trying to use your repo, unfortunately for installing dependency I faced with an error

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\moha\Anaconda3\envs\argenvv01\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moha\\AppData\\Local\\Temp\\pip-install-ev67ewnx\\argparse-config\\setup.py'"'"'; __file__='"'"'C:\\Users\\moha\\AppData\\Local\\Temp\\pip-install-ev67ewnx\\argparse-config\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\moha\AppData\Local\Temp\pip-pip-egg-info-6k9vd6ut'
         cwd: C:\Users\moha\AppData\Local\Temp\pip-install-ev67ewnx\argparse-config\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\moha\AppData\Local\Temp\pip-install-ev67ewnx\argparse-config\setup.py", line 2, in <module>
        from argparse_config import __version__
      File "C:\Users\moha\AppData\Local\Temp\pip-install-ev67ewnx\argparse-config\argparse_config\__init__.py", line 4, in <module>
        import ConfigParser
    ModuleNotFoundError: No module named 'ConfigParser'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

as the repo is for 4 years ago, is there any way that i use it?

ask sth

hi, i am a coder from china, my hands can't type keyboard from last year, when i type keyboard or touch phone my figure hurt.
no doctor knows what happened.
i want to know how do you treat your hand?

Bilingual use problems with some alignments

I run

./disagree.py -b -s en-test.amr -t es-test.amr --align_tgt2src es-en.dict.A3.final --align_src2tgt en-es.dict.A3.final -o amr-visualize/

where

  • en-test.amr is an English AMR sentence representation
  • es-test.amr its Spanish counterpart
  • tgt2src the Giza alignments target to source
  • src2tgt the Giza alignments source to target
    -o the directory to store the image graph

and it gives me this error:

./disagree.py -b -s en-test.amr -t es-test.amr --align_tgt2src es-en.dict.A3.final --align_src2tgt en-es.dict.A3.final -o amr-visualize/
Traceback (most recent call last):
File "./disagree.py", line 314, in
xlang_main(args)
File "./disagree.py", line 242, in xlang_main
smatchgraphs = hilight_disagreement([tgt_amr], src_amr, args.num_restarts, aligner=aligner, gold_aligned_fh=gold_aligned_fh)
File "./disagree.py", line 63, in hilight_disagreement
aligner.set_amrs(a, gold_amr)
File "/home/ragerri/local/AMRICA/compare_smatch/amr_alignment.py", line 45, in set_amrs
self.get_nbest_alignments(self.src2tgt_fh), self.get_nbest_alignments(self.tgt2src_fh))
File "/home/ragerri/local/AMRICA/compare_smatch/amr_alignment.py", line 263, in align_sent2sent_union
src2tgt_align = align_sent2sent(tgt_toks, src_toks, src2tgt)
File "/home/ragerri/local/AMRICA/compare_smatch/amr_alignment.py", line 250, in align_sent2sent
tok_align[tgtind][srcind] += score
IndexError: list index out of range

I attach the 4 relevant files I use. With other alignments and amr examples it works.

es-en-sample.zip

KeyError when more than one node is common between two AMRs to be compared

Hi,
Thanks a lot for the AMRICA tool - it has been really helpful in comparing two AMR parses. I wanted to report a KeyError exception I got while I was using your tool. I will skip the details of what and why about the sample.amr input file.

Following is my sample input that raises KeyError when I run disagree.py:

$prompt$> cat tst/sample.amr
# ::id story-mc160.train.37_15-question-4-option-A_rte
# ::annotator story
# ::snt Ted the walrus also remembered that he had earlier built a time machine.
(x5 / remember
        :ARG0 (x1 / person
                :name (n / name
                        :op1 "Ted"
                        :op2 "the"
                        :op3 "walrus"))
        :mod (x4 / also)
        :ARG1 (x10 / build-01
                :time (x9 / early)
                :ARG1 (x13 / machine
                        :mod (x12 / time))))

# ::id story-mc160.train.37_15-question-4-option-A_rte
# ::annotator rte
# ::snt Mickey the mouse was Ted the Walrus before he was a giant walrus.
(x1 / person
        :name (n / name
                :op1 "Mickey"
                :op2 "the"
                :op3 "mouse"
                :op4 "was"
                :op5 "Ted"
                :op6 "the"
                :op7 "Walrus")
        :domain (x3 / mouse)
        :time (x8 / before
                :op1 (x13 / walrus
                        :mod (x12 / giant))))

When I run AMRICA on the above input I get following error:

$propmpt$> ./disagree.py -i tst/sample.amr -o tst/out
Traceback (most recent call last):
  File "./disagree.py", line 317, in <module>
    monolingual_main(args)
  File "./disagree.py", line 179, in monolingual_main
    amr_graphs = get_disagreement_graphs(smatchgraphs, unmatch_dead_nodes=(gold_aligned_fh == None))
  File "./disagree.py", line 90, in get_disagreement_graphs
    for (g, score) in smatchgraphs]
  File "/usr0/home/sudhi/git/AMRICA/compare_smatch/smatch_graph.py", line 58, in smatch2graph
    self.add_rel1(reln, v, const)
  File "/usr0/home/sudhi/git/AMRICA/compare_smatch/smatch_graph.py", line 154, in add_rel1
    self.unmatched_rel1[(self.gold_ind[var], const_match)].remove(reln)
KeyError: (2, u'the')

I have couple more examples of this error that I can provide. This is not a big issue for me (I am going to skip this input), but I wanted to report the issue and help with it in any way I can.

Thanks!

Op order

Hello there,
First of all thanks for this.
There is a little problem with :op order
The order is not kept in the output graph which makes reading long names very difficult.
also the ":" is removed from time concepts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.