Skip to content

Commit

Permalink
added an optional parameter to set an output textclass for ticcl (--o…
Browse files Browse the repository at this point in the history
…utputclass)
  • Loading branch information
proycon committed Oct 1, 2020
1 parent 2ca48e6 commit 5dd6855
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ticcl.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ params.extension = "folia.xml"
params.inputtype = "folia"
params.outputdir = "ticcl_output"
params.inputclass = "current"
params.outputclass = "current"
params.lexicon = ""
params.artifrq = 10000000
params.alphabet = ""
Expand All @@ -44,6 +45,7 @@ if (params.containsKey('help')) {
log.info " --language LANGUAGE Language"
log.info " --extension STR Extension of FoLiA documents in input directory (default: folia.xml, must always end in xml)!"
log.info " --inputclass CLASS FoLiA text class to use for input, defaults to 'current' for FoLiA input; must be set to 'OCR' for FoLiA documents produced by ocr.nf"
log.info " --outputclass CLASS FoLiA text class to use for output, defaults to 'current' for FoLiA output, but may not be equal to the class used for --inputclass"
log.info " --inputtype STR Input type can be either 'folia' (default), 'text', or 'pdf' (i.e. pdf with text; no OCR)"
log.info " --virtualenv PATH Path to Virtual Environment to load (usually path to LaMachine)"
log.info " --artifrq INT Default value for missing frequencies in the validated lexicon (default: 10000000)"
Expand Down Expand Up @@ -516,6 +518,7 @@ if (!params.containsKey('nofoliacorrect')) {
file unknownfreqlist from unknownfreqlist
val extension from params.extension
val inputclass from inputclass
val outputclass from outputclass
val virtualenv from params.virtualenv

output:
Expand All @@ -534,7 +537,7 @@ if (!params.containsKey('nofoliacorrect')) {
mkdir outputdir
FoLiA-correct --inputclass "${inputclass}" --outputclass current --nums 10 -e ${extension} -O outputdir/ --unk "${unknownfreqlist}" --punct "${punctuationmap}" --rank "${rankedlist}" -t ${task.cpus} . || exit 1
FoLiA-correct --inputclass "${inputclass}" --outputclass "${outputclass}" --nums 10 -e ${extension} -O outputdir/ --unk "${unknownfreqlist}" --punct "${punctuationmap}" --rank "${rankedlist}" -t ${task.cpus} . || exit 1
cd outputdir
ls
Expand Down

0 comments on commit 5dd6855

Please sign in to comment.