-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
235 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
# ============================================================================== | ||
# | ||
# FILE: build-ebooks.sh | ||
# | ||
# USAGE: ./scripts/build-ebooks.sh | ||
# | ||
# DESCRIPTION: Script NOT related with data generation. | ||
# Create ebooks. | ||
# | ||
# OPTIONS: --- | ||
# | ||
# REQUIREMENTS: - POSIX Shell or better | ||
# - scripts/_setup-local-machine.sh | ||
# - asciidoctor-pdf | ||
# - asciidoctor-epub3 | ||
# BUGS: --- | ||
# NOTES: --- | ||
# AUTHORS: Emerson Rocha <rocha[at]ieee.org> | ||
# COLLABORATORS: <@TODO: put additional non-anonymous names here> | ||
# COMPANY: EticaAI | ||
# LICENSE: Public Domain dedication OR Zero-Clause BSD | ||
# SPDX-License-Identifier: Unlicense OR 0BSD | ||
# VERSION: v1.0 | ||
# CREATED: 2021-11-20 09:12 UTC | ||
# ============================================================================== | ||
|
||
set -e | ||
set -x | ||
|
||
bundle exec asciidoctor-pdf -v --attribute allow-uri-read=1 --attribute source-highlighter=rouge docs/eng-Latn/index.adoc --out-file docs/tico-19-hxltm_eng-Latn.pdf | ||
bundle exec asciidoctor-epub3 -v --attribute allow-uri-read=1 --attribute source-highlighter=rouge docs/eng-Latn/index.adoc --out-file docs/tico-19-hxltm_eng-Latn.epub | ||
|
||
set +x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
tmx_filename_original_lang,source_lang_original,source_lang_bcp47,target_lang_original,target_lang_bcp47 | ||
en-ar,en,en,ar,ar | ||
en-bn,en,en,bn,bn | ||
en-ckb,en,en,ckb,ckb | ||
en-din,en,en,din,din | ||
en-es-LA,en,en,es-LA,es-LA | ||
en-fa,en,en,fa,fa | ||
en-fr,en,en,fr,fr | ||
en-fuv,en,en,fuv,fuv | ||
en-ha,en,en,ha,ha | ||
en-hi,en,en,hi,hi | ||
en-id,en,en,id,id | ||
en-km,en,en,km,km | ||
en-kr,en,en,kr,kr | ||
en-ku,en,en,ku,ku | ||
en-lg,en,en,lg,lg | ||
en-ln,en,en,ln,ln | ||
en-mr,en,en,mr,mr | ||
en-ms,en,en,ms,ms | ||
en-my,en,en,my,my | ||
en-ne,en,en,ne,ne | ||
en-nus,en,en,nus,nus | ||
en-om,en,en,om,om | ||
en-prs,en,en,prs,prs | ||
en-ps,en,en,ps,ps | ||
en-pt-BR,en,en,pt-BR,pt-BR | ||
en-ru,en,en,ru,ru | ||
en-rw,en,en,rw,rw | ||
en-so,en,en,so,so | ||
en-sw,en,en,sw,sw | ||
en-ta,en,en,ta,ta | ||
en-ti,en,en,ti,ti | ||
en-ti_ER,en,en,ti_ER,ti-ER | ||
en-ti_ET,en,en,ti_ET,ti-ET | ||
en-tl,en,en,tl,tl | ||
en-ur,en,en,ur,ur | ||
en-zh,en,en,zh,zh | ||
en-zu,en,en,zu,zu | ||
TICO-19 language pair,Source Language,Source language BCP47,Target language,Target language BCP47,Deterministic language pair | ||
en-ar,en,en,ar,ar,en_ar | ||
en-bn,en,en,bn,bn,en_bn | ||
en-ckb,en,en,ckb,ckb,en_ckb | ||
en-din,en,en,din,din,en_din | ||
en-es-LA,en,en,es-LA,es-419,en_es-419 | ||
en-fa,en,en,fa,fa,en_fa | ||
en-fr,en,en,fr,fr,en_fr | ||
en-fuv,en,en,fuv,fuv,en_fuv | ||
en-ha,en,en,ha,ha,en_ha | ||
en-hi,en,en,hi,hi,en_hi | ||
en-id,en,en,id,id,en_id | ||
en-km,en,en,km,km,en_km | ||
en-kr,en,en,kr,kr,en_kr | ||
en-ku,en,en,ku,ku,en_ku | ||
en-lg,en,en,lg,lg,en_lg | ||
en-ln,en,en,ln,ln,en_ln | ||
en-mr,en,en,mr,mr,en_mr | ||
en-ms,en,en,ms,ms,en_ms | ||
en-my,en,en,my,my,en_my | ||
en-ne,en,en,ne,ne,en_ne | ||
en-nus,en,en,nus,nus,en_nus | ||
en-om,en,en,om,om,en_om | ||
en-prs,en,en,prs,prs,en_prs | ||
en-ps,en,en,ps,ps,en_ps | ||
en-pt-BR,en,en,pt-BR,pt-BR,en_pt-BR | ||
en-ru,en,en,ru,ru,en_ru | ||
en-rw,en,en,rw,rw,en_rw | ||
en-so,en,en,so,so,en_so | ||
en-sw,en,en,sw,sw,en_sw | ||
en-ta,en,en,ta,ta,en_ta | ||
en-ti,en,en,ti,ti,en_ti | ||
en-ti_ER,en,en,ti_ER,ti-ER,en_ti-ER | ||
en-ti_ET,en,en,ti_ET,ti-ET,en_ti-ET | ||
en-tl,en,en,tl,tl,en_tl | ||
en-ur,en,en,ur,ur,en_ur | ||
en-zh,en,en,zh,zh,en_zh | ||
en-zu,en,en,zu,zu,en_zu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/python3 | ||
# ============================================================================== | ||
# | ||
# FILE: datainfo_tmx.py | ||
# | ||
# USAGE: ./scripts/fn/datainfo_tmx.py | ||
# | ||
# DESCRIPTION: Quick and hackish way to generate a CSV formated of what | ||
# first version of released TMXs from TICO-19 means | ||
# by the language pair. | ||
# | ||
# OPTIONS: --- | ||
# | ||
# REQUIREMENTS: - python3 | ||
# BUGS: --- | ||
# NOTES: --- | ||
# AUTHORS: Emerson Rocha <rocha[at]ieee.org> | ||
# COLLABORATORS: <@TODO: put additional non-anonymous names here> | ||
# COMPANY: EticaAI | ||
# LICENSE: Public Domain dedication OR Zero-Clause BSD | ||
# SPDX-License-Identifier: Unlicense OR 0BSD | ||
# VERSION: v1.0 | ||
# CREATED: 2021-11-20 03:26 UTC | ||
# ============================================================================== | ||
|
||
import sys | ||
|
||
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help': | ||
print('usage: ' + sys.argv[0] + 'xx-yy xx-YY_ZZ xx-JJ-LL') | ||
print('example: ') | ||
print(' ' + sys.argv[0] + ' en-pt-BR en-ti_ER en-es-LA') | ||
|
||
sys.exit() | ||
|
||
line_items = [] | ||
line_items.append('TICO-19 language pair') | ||
line_items.append('Source Language') | ||
line_items.append('Source language BCP47') | ||
line_items.append('Target language') | ||
line_items.append('Target language BCP47') | ||
line_items.append('Deterministic language pair') | ||
print(','.join(line_items)) | ||
|
||
|
||
def fubar(lang): | ||
if lang == 'es-LA': | ||
return 'es-419' | ||
return lang | ||
|
||
|
||
def tico19_language_row(tico19_lang_convention): | ||
if tico19_lang_convention.find('en-') != -1: | ||
line_items = [] | ||
lang_part_original = tico19_lang_convention | ||
lang_part_source_original = 'en' | ||
lang_part_source_bc47 = 'en' | ||
lang_part_target_original = lang_part_original.replace('en-', '') | ||
lang_part_target_bc47 = fubar( | ||
lang_part_target_original.replace('_', '-')) | ||
|
||
lang_pair_deterministic = lang_part_source_bc47 + '_' + \ | ||
lang_part_target_bc47 | ||
|
||
line_items.append(lang_part_original) | ||
line_items.append(lang_part_source_original) | ||
line_items.append(lang_part_source_bc47) | ||
line_items.append(lang_part_target_original) | ||
line_items.append(lang_part_target_bc47) | ||
line_items.append(lang_pair_deterministic) | ||
print(','.join(line_items)) | ||
return True | ||
|
||
raise Exception('Not implemented + [' + tico19_lang_convention + ']') | ||
|
||
|
||
for i in sys.argv[1:]: | ||
tico19_language_row(i) | ||
|
||
|
||
sys.exit() |
Oops, something went wrong.