Skip to content

Commit

Permalink
Convert some perl scripts to python
Browse files Browse the repository at this point in the history
  • Loading branch information
kleag committed Jun 3, 2024
1 parent 2b41f24 commit 381aafa
Show file tree
Hide file tree
Showing 22 changed files with 908 additions and 145 deletions.
2 changes: 1 addition & 1 deletion gbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ else
fi
current_project=`basename $PWD`
current_project_name="$(head -n2 CMakeLists.txt | tail -n1)"
build_prefix=$LIMA_BUILD_DIR/$current_branch
build_prefix="${LIMA_BUILD_DIR}/${current_branch}"
source_dir=$PWD

if [[ $version = "rev" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion lima_linguisticdata/analysisDictionary/eng/wordnet/flex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#reformat wordnet entries and remove numeric forms
awk '($1 !~ /^[0-9]*$/) {print}' wn_*.txt | awk '{print "^W;;" $1 ";" $3 ";;" }' > mots-simples.txt

../../../scripts/flex.pl def.txt mots-simples.txt . formes-eng.txt exclude.txt
python3 ../../../scripts/flex.py def.txt mots-simples.txt . formes-eng.txt exclude.txt

awk -F";" 'BEGIN {OFS="\t"} ($4) {print $1, $5, "" , $4} ($3) {print $1, $5, "", $3}' formes-eng.txt | sort -u --ignore-case > formes-eng.dic.1

Expand Down
125 changes: 6 additions & 119 deletions lima_linguisticdata/cmake/LinguisticData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,119 +91,6 @@ macro (FLEXION _lang)

endmacro (FLEXION _lang)

# Convert
macro(CONVERT _lang)

add_custom_command(
OUTPUT dicotabs.txt
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/pointvirgules2tabs.py ${CMAKE_CURRENT_BINARY_DIR}/../flex/formes-${_lang}.txt dicotabs.txt
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/../flex/formes-${_lang}.txt
COMMENT "python3 ${PROJECT_SOURCE_DIR}/scripts/pointvirgules2tabs.py ${CMAKE_CURRENT_BINARY_DIR}/../flex/formes-${_lang}.txt dicotabs.txt"
VERBATIM
)
add_custom_target(
dicotabs${_lang}
ALL
DEPENDS dicotabs.txt
)
add_dependencies(dicotabs${_lang} flex${_lang})

add_custom_command(
OUTPUT dicostd.txt
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/cmakeconvertstd.pl dicotabs.txt ${CMAKE_CURRENT_SOURCE_DIR}/convstd.txt dicostd.txt
DEPENDS dicotabs.txt ${CMAKE_CURRENT_SOURCE_DIR}/convstd.txt
COMMENT "perl ${PROJECT_SOURCE_DIR}/scripts/cmakeconvertstd.pl dicotabs.txt ${CMAKE_CURRENT_SOURCE_DIR}/convstd.txt dicostd.txt"
VERBATIM
)
add_custom_target(
dicostd${_lang}
ALL
DEPENDS dicostd.txt
)
add_dependencies(dicostd${_lang} dicotabs${_lang})

set (ADDED_LIST_FILES_RESULT)
foreach(ADDED_LIST_FILE ${ADDED_LIST_FILES})
add_custom_command(
OUTPUT ${ADDED_LIST_FILE}.add
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/addnormfield.pl ${CMAKE_CURRENT_SOURCE_DIR}/${ADDED_LIST_FILE} > ${ADDED_LIST_FILE}.add
DEPENDS dicostd.txt ${ADDED_LIST_FILE}
COMMENT "perl ${PROJECT_SOURCE_DIR}/scripts/addnormfield.pl ${CMAKE_CURRENT_SOURCE_DIR}/${ADDED_LIST_FILE} > ${ADDED_LIST_FILE}.add"
)
set (ADDED_LIST_FILES_RESULT ${ADDED_LIST_FILES_RESULT} ${ADDED_LIST_FILE}.add)
endforeach(ADDED_LIST_FILE ${ADDED_LIST_FILES})
add_custom_target(
dicoadd${_lang}
ALL
DEPENDS ${ADDED_LIST_FILES_RESULT}
)
add_dependencies(dicoadd${_lang} dicostd${_lang})

set(ENV{LC_ALL} "C")

add_custom_command(
OUTPUT dicocompletstd.txt
COMMAND ${SORTPREFIX} sort -u dicostd.txt ${ADDED_LIST_FILES_RESULT} > dicocompletstd.txt
DEPENDS dicostd.txt ${ADDED_LIST_FILES_RESULT}
COMMENT "sort -u dicostd.txt ${ADDED_LIST_FILES_RESULT} > dicocompletstd.txt"
VERBATIM
)
add_custom_target(
dicocomplet${_lang}
ALL
DEPENDS dicocompletstd.txt
)
add_dependencies(dicocomplet${_lang} dicoadd${_lang})

if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
add_custom_command(
OUTPUT dico.xml
COMMAND echo "<dictionary>" > dico.xml.tmp
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/xmlforms.py dicocompletstd.txt dico.xml.tmp
COMMAND bash -c "if [ -n \"${ARGN}\" ]; then cat ${ARGN} >> dico.xml.tmp; fi"
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/addnormfield.pl ${CMAKE_CURRENT_SOURCE_DIR}/dicoponctu.txt > dicoponctu.norm.txt
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/xmlforms.py -desacc=no dicoponctu.norm.txt dico.xml.tmp
COMMAND echo "</dictionary>" >> dico.xml.tmp
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/cmakeconvertdefautjys.py ${CMAKE_CURRENT_SOURCE_DIR}/default-${_lang}.txt ../code/convjys.txt default-${_lang}.dat
COMMAND mv dico.xml.tmp dico.xml
DEPENDS dicocompletstd.txt ${CMAKE_CURRENT_SOURCE_DIR}/dicoponctu.txt ${CMAKE_CURRENT_SOURCE_DIR}/default-${_lang}.txt
COMMENT "CONVERT ${_lang} produce XML dico"
VERBATIM
)
else (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
# WARNING: VERBATIM option add unintentional double quotes symbols in XML file
add_custom_command(
OUTPUT dico.xml
COMMAND echo ^<dictionary^> > dico.xml.tmp
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/xmlforms.py dicocompletstd.txt dico.xml.tmp
COMMAND bash -c "if [ -n \"${ARGN}\" ]; then cat ${ARGN} >> dico.xml.tmp; fi"
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/addnormfield.pl ${CMAKE_CURRENT_SOURCE_DIR}/dicoponctu.txt > dicoponctu.norm.txt
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/xmlforms.py -desacc=no dicoponctu.norm.txt dico.xml.tmp
COMMAND echo ^</dictionary^> >> dico.xml.tmp
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/cmakeconvertdefautjys.py ${CMAKE_CURRENT_SOURCE_DIR}/default-${_lang}.txt ../code/convjys.txt default-${_lang}.dat
COMMAND mv dico.xml.tmp dico.xml
DEPENDS dicocompletstd.txt ${CMAKE_CURRENT_SOURCE_DIR}/dicoponctu.txt ${CMAKE_CURRENT_SOURCE_DIR}/default-${_lang}.txt
COMMENT "produce XML dico"
)
endif (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))

add_custom_target(
dicoxml${_lang}
ALL
DEPENDS dico.xml
)
add_dependencies(dicoxml${_lang} dicocomplet${_lang})

add_custom_target(
convert${_lang}
ALL
)
add_dependencies(convert${_lang} dicoxml${_lang} ${ARGN} )

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/default-${_lang}.dat COMPONENT ${_lang} DESTINATION share/apps/lima/resources/LinguisticProcessings/${_lang})

endmacro(CONVERT _lang)

# Compile XML dictionary
macro(COMPILEXMLDIC _lang _dico _subdir)
message( "${C_BoldYellow}COMPILEXMLDIC(${_lang} ${_dico} ${_subdir})${C_Norm}" )
Expand Down Expand Up @@ -247,11 +134,11 @@ macro(DISAMBMATRICES _lang _succession_categs _codesymbol _priorscript _tablecon

add_custom_command(
OUTPUT trigramMatrix-${_lang}.dat
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_extract.pl ${_succession_categs}
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_extract.py ${_succession_categs}
COMMAND cat ${_succession_categs} | sort | uniq -c | gawk -F" " "{print $2\"\t\"$1}" > unigramMatrix-${_lang}.dat
COMMAND perl ${_priorscript} corpus_${_lang}_merge.txt priorUnigramMatrix-${_lang}.dat ${_codesymbol} ${_tableconvert}
COMMAND python3 ${_priorscript} corpus_${_lang}_merge.txt priorUnigramMatrix-${_lang}.dat ${_codesymbol} ${_tableconvert}
COMMAND cp bigramsend.txt bigramMatrix-${_lang}.dat
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_normalize.pl trigramsend.txt trigramMatrix-${_lang}.dat
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_normalize.py trigramsend.txt trigramMatrix-${_lang}.dat

DEPENDS ${_codesymbol} ${_succession_categs}
COMMENT "compile ${_lang} trigram matrix"
Expand Down Expand Up @@ -283,11 +170,11 @@ macro (DISAMBMATRICES_EXECENV _lang _succession_categs _codesymbol _priorscript
${CMAKE_BINARY_DIR}/execEnv/resources/Disambiguation/bigramMatrix-${_lang}.dat
${CMAKE_BINARY_DIR}/execEnv/resources/Disambiguation/trigramMatrix-${_lang}.dat
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/execEnv/resources/Disambiguation
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_extract.pl ${_succession_categs}
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_extract.py ${_succession_categs}
COMMAND cat ${_succession_categs} | sort | uniq -c | gawk -F" " "{print $2\"\t\"$1}" > unigramMatrix-${_lang}.dat
COMMAND perl ${_priorscript} corpus_${_lang}_merge.txt priorUnigramMatrix-${_lang}.dat ${_codesymbol} ${_tableconvert}
COMMAND python3 ${_priorscript} corpus_${_lang}_merge.txt priorUnigramMatrix-${_lang}.dat ${_codesymbol} ${_tableconvert}
COMMAND cp bigramsend.txt bigramMatrix-${_lang}.dat
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_normalize.pl trigramsend.txt trigramMatrix-${_lang}.dat
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_normalize.py trigramsend.txt trigramMatrix-${_lang}.dat

COMMAND ${CMAKE_COMMAND} -E copy unigramMatrix-${_lang}.dat ${CMAKE_BINARY_DIR}/execEnv/resources/Disambiguation/unigramMatrix-${_lang}.dat
COMMAND ${CMAKE_COMMAND} -E copy priorUnigramMatrix-${_lang}.dat ${CMAKE_BINARY_DIR}/execEnv/resources/Disambiguation/priorUnigramMatrix-${_lang}.dat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ add_custom_target(
DEPENDS succession_categs_retag.txt corpus_eng_merge.txt
)

DISAMBMATRICES(eng succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl X,SYM,UNK,PROPN,CONJ,NUM)
DISAMBMATRICES(eng succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py X,SYM,UNK,PROPN,CONJ,NUM)

DISAMBMATRICES_EXECENV(eng succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl X,SYM,UNK,PROPN,CONJ,NUM)
DISAMBMATRICES_EXECENV(eng succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py X,SYM,UNK,PROPN,CONJ,NUM)

add_dependencies(trigrammatrix-eng categs-eng)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ add_custom_target(
DEPENDS succession_categs_retag.txt
)

DISAMBMATRICES(fre succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl U,ET,PREF,NPP,PONCT,CC,CS)
DISAMBMATRICES(fre succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py U,ET,PREF,NPP,PONCT,CC,CS)

DISAMBMATRICES_EXECENV(fre succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl U,ET,PREF,NPP,PONCT,CC,CS)
DISAMBMATRICES_EXECENV(fre succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py U,ET,PREF,NPP,PONCT,CC,CS)

add_dependencies(trigrammatrix-fre categs-fre)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ add_custom_target(
DEPENDS succession_categs_retag.txt
)

DISAMBMATRICES(por succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl DIVERS_*,NOM_PROPRE*,CONJ_*,NOMBRE*)
DISAMBMATRICES(por succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py DIVERS_*,NOM_PROPRE*,CONJ_*,NOMBRE*)

DISAMBMATRICES_EXECENV(por succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.pl DIVERS_*,NOM_PROPRE*,CONJ_*,NOMBRE*)
DISAMBMATRICES_EXECENV(por succession_categs_retag.txt ${CMAKE_CURRENT_SOURCE_DIR}/code_symbolic2lima.txt ${PROJECT_SOURCE_DIR}/scripts/disamb_matrices_prior-convert.py DIVERS_*,NOM_PROPRE*,CONJ_*,NOMBRE*)

add_dependencies(trigrammatrix-por categs-por)

Expand Down
4 changes: 2 additions & 2 deletions lima_linguisticdata/rules-idiom/eng/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ file (GLOB SYMBOLICCODESENG ${PROJECT_SOURCE_DIR}/analysisDictionary/eng/code/sy

add_custom_command(
OUTPUT idiomaticExpressions-eng.rules
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.pl ${CMAKE_CURRENT_SOURCE_DIR}/idioms-eng.txt > idioms-eng.grace
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/transcodeIdiomatic.pl ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes --configDir=${PROJECT_SOURCE_DIR}/../lima_common/conf/ ${PROJECT_SOURCE_DIR}/analysisDictionary/eng/code/code-eng.xml ${SYMBOLICCODESENG} idioms-eng.grace > idiomaticExpressions-eng.rules
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.py ${CMAKE_CURRENT_SOURCE_DIR}/idioms-eng.txt > idioms-eng.grace
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/transcode_idiomatic.py ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes ${PROJECT_SOURCE_DIR}/analysisDictionary/eng/code/code-eng.xml ${SYMBOLICCODESENG} idioms-eng.grace > idiomaticExpressions-eng.rules
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/idioms-eng.txt
${SYMBOLICCODESENG}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ for example in $*; do

python -c "import os, re; open('conf/lima-lp-tva-fre-example.xml', 'w', encoding='utf-8').write(re.sub(r'LinguisticProcessings/fre/idiomaticExpressions-fre.rules', f'idiom-examples/{os.getenv('exampleFile')}', open(os.path.join(os.getenv('LIMA_CONF'), 'lima-lp-tva-fre.xml'), 'r', encoding='utf-8').read()))"

# perl -pe 's%LinguisticProcessings/fre/idiomaticExpressions-fre.rules%idiom-examples/$ENV{"exampleFile"}%' $LIMA_CONF/lima-lp-tva-fre.xml > conf/lima-lp-tva-fre-example.xml;
echo "running test on $exampleFile";
tva --language=fre --resources-dir=resources --config-dir=conf --lp-config-file=lima-lp-tva-example.xml idiom-example-fre-test.xml >& tva-$example.log;
egrep "(TestReport|total)" tva-$example.log
Expand Down
10 changes: 5 additions & 5 deletions lima_linguisticdata/rules-idiom/fre/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ file (GLOB SYMBOLICCODESFRE ${PROJECT_SOURCE_DIR}/analysisDictionary/fre/code/sy

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/idiomaticExpressions-fre.rules
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/buildSeparableVerbList.pl -list=${CMAKE_CURRENT_BINARY_DIR}/separableVerbs.lst -rules=${CMAKE_CURRENT_BINARY_DIR}/separableVerbsSecond.rules ${CMAKE_CURRENT_SOURCE_DIR}/idioms-fre.txt > ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.withoutVerbs.txt
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/buildSeparableVerbList.pl -list=${CMAKE_CURRENT_BINARY_DIR}/separableVerbs.lst -rules=${CMAKE_CURRENT_BINARY_DIR}/separableVerbsSecond.rules ${CMAKE_CURRENT_SOURCE_DIR}/idioms-fre.txt > ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.withoutVerbs.txt
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.pl ${CMAKE_CURRENT_SOURCE_DIR}/idioms-fre.txt > ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.grace
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/separableVerbs.rules ${CMAKE_CURRENT_BINARY_DIR}/separableVerbsSecond.rules >> ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.grace
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/transcodeIdiomatic.pl ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes --configDir=${PROJECT_SOURCE_DIR}/../lima_common/conf/ ${PROJECT_SOURCE_DIR}/analysisDictionary/fre/code/code-fre.xml ${SYMBOLICCODESFRE} ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.grace > ${CMAKE_CURRENT_BINARY_DIR}/idiomaticExpressions-fre.rules
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/transcodeIdiomatic.pl ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes ${PROJECT_SOURCE_DIR}/analysisDictionary/fre/code/code-fre.xml ${SYMBOLICCODESFRE} ${CMAKE_CURRENT_BINARY_DIR}/idioms-fre.grace > ${CMAKE_CURRENT_BINARY_DIR}/idiomaticExpressions-fre.rules
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/buildSeparableVerbList.pl
${PROJECT_SOURCE_DIR}/scripts/build_separable_verb_list.py
${CMAKE_CURRENT_SOURCE_DIR}/categories_convert
${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.pl
${PROJECT_SOURCE_DIR}/scripts/transcodeIdiomatic.pl
${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.py
${PROJECT_SOURCE_DIR}/scripts/transcode_idiomatic.py
${CMAKE_CURRENT_SOURCE_DIR}/idioms-fre.txt
${CMAKE_CURRENT_SOURCE_DIR}/separableVerbs.rules
${SYMBOLICCODESFRE}
Expand Down
4 changes: 2 additions & 2 deletions lima_linguisticdata/rules-idiom/por/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ file (GLOB SYMBOLICCODESPOR ${PROJECT_SOURCE_DIR}/analysisDictionary/por/code/sy

add_custom_command(
OUTPUT idiomaticExpressions-por.rules
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.pl ${CMAKE_CURRENT_SOURCE_DIR}/idioms-por.txt > idioms-por.grace
COMMAND perl ${PROJECT_SOURCE_DIR}/scripts/transcodeIdiomatic.pl ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes --configDir=${PROJECT_SOURCE_DIR}/../lima_common/conf/ ${PROJECT_SOURCE_DIR}/analysisDictionary/por/code/code-por.xml ${SYMBOLICCODESPOR} idioms-por.grace > idiomaticExpressions-por.rules
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/reformat_idioms.py ${CMAKE_CURRENT_SOURCE_DIR}/idioms-por.txt > idioms-por.grace
COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/transcode_idiomatic.py ${CMAKE_BINARY_DIR}/lima_linguisticprocessing/tools/common/convertSymbolicCodes ${PROJECT_SOURCE_DIR}/analysisDictionary/por/code/code-por.xml ${SYMBOLICCODESPOR} idioms-por.grace > idiomaticExpressions-por.rules
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/idioms-por.txt
${SYMBOLICCODESPOR}
Expand Down
Loading

0 comments on commit 381aafa

Please sign in to comment.