From bc83319ff132242231447dda7c0a02d63db1bea2 Mon Sep 17 00:00:00 2001 From: Alexander Gutkin Date: Thu, 12 Dec 2024 21:18:53 +0000 Subject: [PATCH] Internal change PiperOrigin-RevId: 705609681 --- .../glyphs/helpers/raster_to_vector.sh | 69 +++++ .../glyphs/helpers/vector_to_raster.sh | 53 ++++ protoscribe/glyphs/make_text.sh | 66 +++++ .../collect_wiktionary_syllable_types.sh | 249 ++++++++++++++++++ 4 files changed, 437 insertions(+) create mode 100755 protoscribe/glyphs/helpers/raster_to_vector.sh create mode 100755 protoscribe/glyphs/helpers/vector_to_raster.sh create mode 100755 protoscribe/glyphs/make_text.sh create mode 100755 protoscribe/language/phonology/collect_wiktionary_syllable_types.sh diff --git a/protoscribe/glyphs/helpers/raster_to_vector.sh b/protoscribe/glyphs/helpers/raster_to_vector.sh new file mode 100755 index 0000000..75eb594 --- /dev/null +++ b/protoscribe/glyphs/helpers/raster_to_vector.sh @@ -0,0 +1,69 @@ +# Copyright 2024 The Protoscribe Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +# +# Converts input image in (PNG/JPG/etc.) format to SVG. +# +# Please note: You can *also* run this utility *directly* on the input SVGs. +# +# Dependencies: +# ------------- +# sudo apt-get install imagemagick potrace + +# From https://stackoverflow.com/questions/56696496/how-to-convert-jpg-or-png-image-to-svg-and-save-it: +# +# Following converts PNG file to PGM format, removes image transparency, outputs +# the result image to the standard input of `mkbitmap` that transforms the input +# with highpass filtering and thresholding into a suitable for the `potrace` +# program format, that finally generates SVG file. +# +# You can play around with highpass filtering (-f) and thresholding (-t) values +# until you have the final look that you want. + +while getopts 'i:o:' OPTION ; do + case "$OPTION" in + i) + INPUT_FILE="$OPTARG" + ;; + o) + OUTPUT_FILE="$OPTARG" + ;; + ?) + echo "Usage: $(basename \$0) -i INPUT -o OUTPUT" >&2 + exit 1 + ;; + esac +done + +if [ ! -f "${INPUT_FILE}" ] ; then + echo "Invalid input file!" + exit 1 +fi +if [ -z "${OUTPUT_FILE}" ] ; then + echo "Output file not specified!" + exit 1 +fi + +# This is not trivial as the background is not necessarily white. +TMPFILE_PGM=$(mktemp --suffix .pgm /tmp/raster2vector.XXXXXX) +convert -verbose "${INPUT_FILE}" \ + -fuzz 15% -flatten -alpha remove -background white ${TMPFILE_PGM} \ + || { echo "convert failed!" >&2; exit 1; } +TMPFILE_BMP=$(mktemp --suffix .bmp /tmp/raster2vector.XXXXXX) +mkbitmap -f 32 -t 0.4 ${TMPFILE_PGM} -o ${TMPFILE_BMP} \ + || { echo "mkbitmap failed!" >&2; exit 1; } +potrace --svg ${TMPFILE_BMP} -o "${OUTPUT_FILE}" \ + || { echo "potrace failed!" >&2; exit 1; } +rm -f ${TMPFILE_PGM} ${TMPFILE_BMP} diff --git a/protoscribe/glyphs/helpers/vector_to_raster.sh b/protoscribe/glyphs/helpers/vector_to_raster.sh new file mode 100755 index 0000000..d6c7931 --- /dev/null +++ b/protoscribe/glyphs/helpers/vector_to_raster.sh @@ -0,0 +1,53 @@ +# Copyright 2024 The Protoscribe Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +# +# Converts SVGs to PNGs. +# +# Dependencies: +# ------------- +# sudo apt-get install librsvg2-bin + +WIDTH=256px +HEIGHT=256px +BACKGROUND= +while getopts 'i:o:h:w:b' OPTION ; do + case "$OPTION" in + i) + INPUT_FILE="$OPTARG" + ;; + o) + OUTPUT_FILE="$OPTARG" + ;; + w) + WIDTH="$OPTARG" + ;; + h) + HEIGHT="$OPTARG" + ;; + b) + BACKGROUND="-b white" + ;; + ?) + echo "Usage: $(basename \$0) -i INPUT -o OUTPUT" >&2 + exit 1 + ;; + esac +done + +rsvg-convert \ + --width=${WIDTH} --height=${HEIGHT} \ + --keep-aspect-ratio ${BACKGROUND} ${INPUT_FILE} > ${OUTPUT_FILE} \ + || { echo "rsvg-convert failed!" >&2; exit 1; } diff --git a/protoscribe/glyphs/make_text.sh b/protoscribe/glyphs/make_text.sh new file mode 100755 index 0000000..75bf099 --- /dev/null +++ b/protoscribe/glyphs/make_text.sh @@ -0,0 +1,66 @@ +# Copyright 2024 The Protoscribe Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +# Usage, e.g.: +# +# protoscribe/glyphs/make_text.sh \ +# -t X,X,I,I,CLOTH,SHIRT \ +# -p /var/tmp/22_shirts.png \ +# -d # If you want to display the result with Eye of GNOME (eog) viewer. + +while getopts 'b:t:p:s:S:d' OPTION +do + case "${OPTION}" in + b) + BCKGRND="${OPTARG}" + ;; + t) + TERMS="${OPTARG}" + ;; + p) + PNG="${OPTARG}" + ;; + s) + SVG="${OPTARG}" + ;; + S) + SVG_FOR_STROKES="${OPTARG}" + ;; + d) + DISPLAY_PNG=true + ;; + esac +done +if [ "${BCKGRND}" == "" ] +then + BCKGRND="ivory" +fi + +SRC_DIR=protoscribe +"python ${SRC_DIR}/glyphs/make_text"_main.py \ + --random_resize \ + --random_pad \ + --random_rotate \ + --extra_pad=50 \ + --concepts="${TERMS}" \ + --background_color="${BCKGRND}" \ + --svg_output="${SVG}" \ + --svg_for_strokes_output="${SVG_FOR_STROKES}" \ + --output="${PNG}" +if [ "${DISPLAY_PNG}" == "true" ] +then + eog "${PNG}" +fi diff --git a/protoscribe/language/phonology/collect_wiktionary_syllable_types.sh b/protoscribe/language/phonology/collect_wiktionary_syllable_types.sh new file mode 100755 index 0000000..d3c04dd --- /dev/null +++ b/protoscribe/language/phonology/collect_wiktionary_syllable_types.sh @@ -0,0 +1,249 @@ +# Copyright 2024 The Protoscribe Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +# +# Helper script for accumulating syllable types. + +WIKTIONARY_DIR=/var/tmp/wiktionary_tsv +WIKTIONARY="${WIKTIONARY_DIR}/aar_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/abk_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/acw_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/afb_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/afr_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ajp_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/akk_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ale_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/amh_ethi_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ang_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/aot_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ara_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/arc_hebr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ary_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/arz_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/asm_beng_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ast_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ayl_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/aze_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bak_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ban_bali_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bcl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bdq_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ben_beng_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/blt_tavt_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bod_tibt_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bre_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/bul_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cat_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cbn_thai_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ceb_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ces_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/chb_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/che_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cho_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ckb_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cmn_hani_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cnk_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cop_copt_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cor_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cos_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/crk_cans_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/crk_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/crx_cans_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/csb_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/cym_latn_nw_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dan_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/deu_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/div_thaa_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dlm_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dng_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dsb_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dum_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/dzo_tibt_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/egy_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ell_grek_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/eng_latn_uk_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/enm_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/epo_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/est_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ett_ital_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/eus_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ewe_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fao_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fas_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fin_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fra_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fro_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/frr_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/fry_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/gla_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/gle_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/glg_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/glv_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/gml_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/goh_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/got_goth_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/grc_grek_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/gsw_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/guj_gujr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/gur_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hau_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/haw_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hbs_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hbs_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/heb_hebr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hin_deva_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hrx_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/hts_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/iba_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ido_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ilo_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ina_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ind_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/isl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ita_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/izh_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/jam_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/jje_hang_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kal_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kan_knda_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kas_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kat_geor_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kaz_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/khb_talu_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/khm_khmr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kik_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kir_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kld_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kmr_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kok_deva_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kpv_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/krl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/kxd_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lad_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lao_laoo_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lat_latn_clas_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lif_limb_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lij_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lit_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/liv_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lmo_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lsi_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ltg_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ltz_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lwl_thai_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/lzz_geor_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mah_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mal_mlym_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mar_deva_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mdf_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mfe_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mga_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mic_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mlg_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mlt_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mnw_mymr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mon_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mqs_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/msa_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mww_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/mya_mymr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nan_hani_xi_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nap_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nav_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nci_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nds_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nhn_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nhx_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nld_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nno_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nob_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/non_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nor_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nrf_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/nya_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/oci_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ofs_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/okm_hang_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/olo_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ori_orya_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/osp_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/osx_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ota_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pan_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pan_guru_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pbv_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pcc_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pdc_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/phl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pms_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pol_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/por_latn_bz_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pox_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ppl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/pus_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/rgn_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ron_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sah_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/san_deva_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sce_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/scn_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sco_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sga_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/shn_mymr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sid_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/slk_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/slv_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sme_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/spa_latn_ca_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/sqi_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/srd_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/srn_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/stq_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/swe_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/syl_sylo_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tam_taml_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tel_telu_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tft_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tgk_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tgl_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tha_thai_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ton_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tpw_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tuk_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tur_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/twf_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tyv_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/tzm_tfng_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/uig_arab_ara_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/urd_arab_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/urk_thai_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/vol_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/wau_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/wiy_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/wlm_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/xal_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/ybi_deva_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/yid_hebr_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/yor_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/yue_hani_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/yux_cyrl_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/zha_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/zom_latn_broad.tsv" +WIKTIONARY="${WIKTIONARY},${WIKTIONARY_DIR}/zul_latn_broad.tsv" + +SRC_DIR=protoscribe +python ${SRC_DIR}/language/phonology/collect_wiktionary_syllable_types_main.py \ + --wiktionary_files="${WIKTIONARY}" \ + --output="${SRC_DIR}/data/phonology/wiktionary_syllable_stats.tsv"