I use a program called LF-Aligner that uses dictionaries to make parallel texts out of texts in different languages. I believe it’s written in Perl. It’s based on another program called Hunalign.
When I used it a few months earlier, it worked perfectly. It got accidentally deleted, I recently reinstalled it, but now I just get the error message:
Aligning...
Dictionary used by Hunalign: es-en.dic
Can't spawn "cmd.exe": No such file or directory at script/LF_aligner_2011_06_29_multi.pl line 1856.
Use of uninitialized value $alignedfilesize in numeric eq (==) at script/LF_aligner_2011_06_29_multi.pl line 1864.
-------------------------------------------------
Align failed (probably due to one file being empty or very short). ABORTING...
I can’t understand it. Could it be a conflict with something I’ve installed in the meantime? Or something I’ve deleted, maybe?
(The problem is not due to “one file being empty or very short“, as the program suggests. The files are just fine.)
EDIT: Here is the log file:
Program: LF aligner, version: 2.56, OS: Windows, launched: 2011/09/28, 04:13:01
Setup: filetype_def: t; filetype_prompt: y; l1_def: en; l2_def: hu; l1_prompt: y; l2_prompt: y; segmenttext_def: y; segmenttext_prompt: y=; cleanup_def: y; cleanup_prompt: y; review_def: x; review_prompt: y; create_tmx_def: y; create_tmx_prompt: y; l1_code_def: EN-GB; l2_code_def: HU; l1_code_prompt: y; l2_code_prompt: y; creationdate_prompt: y; creationid_def: ; creationid_prompt: y; ask_master_TM: n; chopmode: 0; tmxnote_def: ; tmxnote_prompt: y; pdfmode: y
GUI on
filetype: t
Input file 1: kakeen.rtf (C:/Users/jippi/Desktop/qewr/kakeen.rtf)
Input file 2: kaketo.rtf (C:/Users/jippi/Desktop/qewr/kaketo.rtf)
Input file sizes: 1375014 bytes 1375014 bytes
Converting rtf files to txt; AbiWord binary: C:\Program Files (x86)\LF_aligner_2.56\aligner\scripts\abiword\bin\AbiWord.exe
Converting rtf files to txt; AbiWord binary: C:\Program Files (x86)\LF_aligner_2.56\aligner\scripts\abiword\bin\AbiWord.exe
File sizes after conversion to txt: 1074504 bytes 1074504 bytes
Initial stats:
- en: 6091 segments, 196644 words, 1037434 chars
- en: 6091 segments, 196644 words, 1037434 chars
Segmentation: y
(The problem occurs when I use txt-files aswell.)
I downloaded the application in question. It is a Perl application packed using
pp.To see the code in question,
unzipthe downloaded file and then extract the contents of the executable usingE:\Home\Downloads\LF_aligner_2.56_win\aligner> unzip LF_aligner_2.56.exe -d some-temp-dirYou’ll find the file
some-temp-dir\script\LF_aligner_2011_06_29_multi.plLine 1856 is:
system ("\"$hunalign_bin\" -text \"$scriptpath/scripts/hunalign/data/$hunalign_dic\" \"$folder/$file1\" \"$folder/$file2\" > \"$folder/aligned_${alignfilename}.txt\"");which is messy to say the least. The program does not check if the
systemsucceeded. Because thesystemfails, the subsequent attempt to read the size of the output file also fails (note the warning) and subsequently, the program realizes something went wrong:None of this solves your problem, but gives you something to investigate if you feel like it. At the very least, you might want to notify the author of the program.
The way the author handles paths is too messy for anyone else to feel really motivated to investigate.