Skip to content

Commit

Permalink
Merge branch 'last-fixes' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Mar 2, 2024
2 parents 3c63180 + 34c2740 commit 570ff96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ class BabelonTranslationProduct(Product):
include_not_translated: str = "false"
"""if include_not_translated is 'false' NOT_TRANSLATED values are removed during preprocessing."""

update_translation_status: str = "false"
update_translation_status: str = "true"
"""if update_translation_status is 'true', translations where the source_value has changed are relegated to CANDIDATE status."""

drop_unknown_columns: str = "true"
"""if drop_unknown_columns is 'true' columns that are not part of the babelon standard are removed during preprocessing."""

auto_translate: bool = False
"""if auto_translate is true, missing values are being translated using the babelon toolkit during preprocessing. By default, the toolkit employs LLM-mediated translations using the OpenAI API. This default may change at any time."""

Expand Down
3 changes: 2 additions & 1 deletion template/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ $(TRANSLATIONSDIR)/{{ translation.id }}-preprocessed.babelon.tsv: $(TRANSLATIONS
--output-not-translated $(TRANSLATIONSDIR)/{{ translation.id }}-not-translated.babelon.tsv \
--include-not-translated {{ translation.include_not_translated|default('false') }} \
--update-translation-status {{ translation.update_translation_status|default('true') }} \
--drop-unknown-columns {{ translation.drop_unknown_columns|default('true') }} \
-o $@{% if translation.auto_translate %}
echo "Warning: By default, the toolkit employs LLM-mediated translations using the OpenAI API. This default may change at any time"
echo "Warning: Never store API keys or other secrets in Makefiles or scripts you have in version control."
Expand All @@ -983,7 +984,7 @@ $(TRANSLATIONSDIR)/%.synonyms.owl: $(TRANSLATIONSDIR)/%.synonyms.tsv
.PRECIOUS: $(TRANSLATIONSDIR)/%.synonyms.owl

$(TRANSLATIONSDIR)/%.babelon.owl: $(TRANSLATIONSDIR)/%-preprocessed.babelon.tsv
$(BABELONPY) convert $(TMPDIR)/$*.babelon.tsv --output-format owl -o [email protected]
$(BABELONPY) convert $< --output-format owl -o [email protected]
$(ROBOT) merge -i [email protected] \
annotate \
--ontology-iri $(ONTBASE)/translations/$*.babelon.owl \
Expand Down

0 comments on commit 570ff96

Please sign in to comment.