Skip to content

Commit

Permalink
1603_1.py (#29): failed; test renaming before merge dont work; maybe …
Browse files Browse the repository at this point in the history
…do after? refs #29 (comment)
  • Loading branch information
fititnt committed Apr 28, 2022
1 parent 13d69ea commit 404a5e8
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions officinam/999999999/999999999.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1225,19 +1225,25 @@ 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"
else
# 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
Expand All @@ -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"

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 404a5e8

Please sign in to comment.