Skip to content

Commit 3a60c9b

Browse files
committed
attempted fix for FoLiA-correct invocation (#50 #52)
1 parent 8444b0c commit 3a60c9b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ticcl.nf

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,18 +419,22 @@ process foliacorrect {
419419
#some bookkeeping
420420
mkdir outputdir
421421
422-
find . -name '*.xml' -size 0 -print0 | xargs -0 rm
422+
423423
FoLiA-correct --inputclass "${inputclass}" --outputclass current --nums 10 -e ${extension} -O outputdir/ --unk "${unknownfreqlist}" --punct "${punctuationmap}" --rank "${rankedlist}" -t ${task.cpus} .
424+
424425
cd outputdir
426+
ls
425427
426428
#rename files so they have *.ticcl.folia.xml as extension (rather than .ticcl.xml which FoLiA-correct produces)
427429
for f in *.xml; do
428-
if [[ \${f%.ticcl.xml} != \$f ]]; then
429-
newf="\${f%.ticcl.xml}.ticcl.folia.xml"
430-
else
431-
newf="\$f"
430+
if [[ $f != "*.xml" ]]; then
431+
if [[ \${f%.ticcl.xml} != \$f ]]; then
432+
newf="\${f%.ticcl.xml}.ticcl.folia.xml"
433+
else
434+
newf="\$f"
435+
fi
436+
mv \$f ../\$newf
432437
fi
433-
mv \$f ../\$newf
434438
done
435439
cd ..
436440
"""

0 commit comments

Comments
 (0)