Skip to content

Commit 13d2be5

Browse files
committed
Add debug arg to add_glosses_to_trees
1 parent 088712b commit 13d2be5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/scaife_stack_atlas/temp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def add_translations_to_trees(reset=None):
371371
add_odyssey_english_translations()
372372

373373

374-
def add_glosses_to_trees(reset=None):
374+
def add_glosses_to_trees(reset=None, debug=False):
375375
# NOTE: Reset is a no-op
376376
collection_urn = "urn:cite2:beyond-translation:text_annotation_collection.atlas_v1:il_gregorycrane_gAGDT"
377377
# TODO: Figure out why this query doesn't work as expected against
@@ -405,9 +405,9 @@ def add_glosses_to_trees(reset=None):
405405
pass
406406
elif word.get("value") in ["[0]", "[1]"]:
407407
pass
408-
elif word.get("ref"):
408+
elif word.get("ref") and debug:
409409
print(f'{word["ref"]}@{word["value"]}')
410-
else:
410+
elif debug:
411411
print(f'{word["value"]}')
412412
# ~40 words unmapped with this naive pass
413413
data = annotation.data if annotation else {}

0 commit comments

Comments
 (0)