From 404a5e82ff008eb1bc8ffc584884e38761e61749 Mon Sep 17 00:00:00 2001 From: Emerson Rocha Date: Thu, 28 Apr 2022 00:57:37 -0300 Subject: [PATCH] 1603_1.py (#29): failed; test renaming before merge dont work; maybe do after? refs https://github.com/EticaAI/multilingual-lexicography/issues/29#issuecomment-1111707350 --- officinam/999999999/999999999.lib.sh | 32 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/officinam/999999999/999999999.lib.sh b/officinam/999999999/999999999.lib.sh index b41e98f..62dd07b 100644 --- a/officinam/999999999/999999999.lib.sh +++ b/officinam/999999999/999999999.lib.sh @@ -1225,11 +1225,17 @@ file_merge_numerordinatio_de_wiki_q() { # TODO: implement check if necessary to revalidate echo "${FUNCNAME[0]} sources changed_recently. Reloading... [$fontem_archivum]" + # NOTE: explanation on the hotfix +ix_deleteme here: + # https://github.com/EticaAI/multilingual-lexicography/issues/ + # 29#issuecomment-1111707350 + # This may be removed when hxlmerge --replace works with so many + # columns at once. + if [ "$est_non_normale" -eq "1" ]; then # We apply 'hxlclean --lower' only on writting systems which this make # sence. On this case at least '+is_latn,+is_cyrl' hxlrename \ - --rename='item+conceptum+codicem:#item+rem+i_qcc+is_zxxx+ix_wikiq' \ + --rename='item+conceptum+codicem:#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_deleteme' \ "$fontem_q_archivum" | hxlclean --lower='#*+is_latn,#*+is_cyrl' \ >"$fontem_q_archivum_temporarium" @@ -1237,7 +1243,7 @@ file_merge_numerordinatio_de_wiki_q() { # We apply 'hxlclean --lower' only on writting systems which this make # sence. On this case at least '+is_latn,+is_cyrl' hxlrename \ - --rename='item+conceptum+codicem:#item+rem+i_qcc+is_zxxx+ix_wikiq' \ + --rename='item+conceptum+codicem:#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_deleteme' \ "$fontem_q_archivum" \ >"$fontem_q_archivum_temporarium" fi @@ -1250,15 +1256,31 @@ file_merge_numerordinatio_de_wiki_q() { # echo "oi2" - hxlmerge --keys='#item+rem+i_qcc+is_zxxx+ix_wikiq' \ + hxlmerge --keys='#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_deleteme' \ --tags='#item+rem' \ --merge="$fontem_q_archivum_temporarium" \ "$fontem_archivum" \ + | hxlcut --exclude='#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_deleteme' \ >"$objectivum_archivum_temporarium" + # BUG: if we use hxlmerge --replace, instead of not be repeated on final + # dataset, we lost all additional column data. This migth be because + # we're far beyond typical number of columns libhxl-python is tested to + # work + + # set -x + # hxlmerge --keys='#item+rem+i_qcc+is_zxxx+ix_wikiq' \ + # --replace \ + # --tags='#item+rem' \ + # --merge="$fontem_q_archivum_temporarium" \ + # "$fontem_archivum" \ + # >"$objectivum_archivum_temporarium" + # set +x + sed -i '1d' "${objectivum_archivum_temporarium}" - rm "$fontem_q_archivum_temporarium" + # cp "$objectivum_archivum_temporarium" "$objectivum_archivum_temporarium.tmp" + # rm "$fontem_q_archivum_temporarium" file_update_if_necessary csv "$objectivum_archivum_temporarium" "$objectivum_archivum" @@ -2273,7 +2295,7 @@ actiones_completis_locali() { if [ -z "$(quaero__ix_n1603ia__victionarium_q "$numerordinatio")" ]; then # echo "yay" - file_translate_csv_de_numerordinatio_q "$numerordinatio" "0" "0" "1" + # file_translate_csv_de_numerordinatio_q "$numerordinatio" "0" "0" "1" file_merge_numerordinatio_de_wiki_q "$numerordinatio" "0" "0" file_convert_tmx_de_numerordinatio11 "$numerordinatio" file_convert_tbx_de_numerordinatio11 "$numerordinatio"