jamr icon indicating copy to clipboard operation
jamr copied to clipboard

Aligner not returning anything

Open mdtux89 opened this issue 9 years ago • 3 comments

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

mdtux89 avatar Sep 30 '15 09:09 mdtux89

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"

jflanigan avatar Oct 01 '15 06:10 jflanigan

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

mdtux89 avatar Oct 01 '15 09:10 mdtux89

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

ritwikmishra avatar Dec 26 '17 08:12 ritwikmishra