jflanigan / jamr

JAMR Parser and Generator
BSD 2-Clause "Simplified" License
194 stars 49 forks source link

Aligner not returning anything #12

Open mdtux89 opened 9 years ago

mdtux89 commented 9 years ago

Hi, I followed the instruction and tried to align the following AMR:

cat amr_input 
(f / flower
      :mod (e / even)
      :ARG0-of (h / have-03
            :ARG1 (t / thorn)))

using the command "scripts/ALIGN.sh < amr_input". I get this warning:

 ### Tokenizing ###
which: no uconv in (/sbin:/bin:/usr/sbin:/usr/bin)
[...]/jamr/tools/cdec/corpus/support/utf8-normalize.sh: FFFF Cannot find ICU uconv (http://site.icu-project.org/) ... falling back to iconv. Quality may suffer.

but I don't get any output. Is ucon necessary for the aligner to work, or is there something else that's going wrong here? The parser works properly.

Thanks in advance, Marco

jflanigan commented 9 years ago

uconv shouldn't be necessary. Which operating system and version are you using?

You could try commenting out line 31 (which removes the temp files), and then inspect the temp files (/tmp/jamr-*) to see if there were any errors. Or try running the commands in the script manually to see where the error happens like this:

INPUT=amr_input
cat "${INPUT}" | grep '::snt ' | sed 's/^# ::snt //' | "${CDEC}/corpus/tokenize-anything.sh" > "${INPUT}.snt.tok"
${JAMR_HOME}/run CorpusTool < "${INPUT}" --tokenized "${INPUT}.snt.tok" > "${INPUT}.tok"
${JAMR_HOME}/run Aligner -v 0 < "${INPUT}.tok"
mdtux89 commented 9 years ago

Thanks for the reply! Found the problem, my bad. The aligner is expecting amr in the format:

# ::id lpp_1943.293 ::date 2012-11-18T16:50:42 ::annotator ISI-AMR-05 ::preferred
# ::snt I answered , " eats anything it finds in its reach . "
# ::zh “它碰到什么吃什么。” 我回答。
# ::save-date Thu Apr 18, 2013 ::file lpp_1943_293.txt
(a / answer-01
      :ARG0 (i / i)
      :ARG1 (e / eat-01
            :ARG1 (a2 / anything
                  :ARG1-of (f / find-01
                        :ARG0 (i2 / it)
                        :location (r / reach-03
                              :ARG0 i2)))))

while I was only giving the plain amr:

(a / answer-01
      :ARG0 (i / i)
      :ARG1 (e / eat-01
            :ARG1 (a2 / anything
                  :ARG1-of (f / find-01
                        :ARG0 (i2 / it)
                        :location (r / reach-03
                              :ARG0 i2)))))

It's probably worth mentioning this in the readme. Cheers

ritwikmishra commented 6 years ago

I was getting ArrayIndexOutOfBoundsException while running the parser. I followed this solution and it worked. But then same error occurred while running the ALIGN.sh script. I did this and now the Aligner is not returning anything. I am giving the aligner script the amr format only. What can be done? Thanks