Skip to content
Snippets Groups Projects
Commit 3073e3c4 authored by Eva Bardou's avatar Eva Bardou :frog:
Browse files

Nit

parent 8bd5186f
No related branches found
No related tags found
1 merge request!348Allow extracting elements holding transcriptions without entities
This commit is part of merge request !348. Comments created here will be created in the context of that merge request.
......@@ -106,9 +106,10 @@ class ArkindexExtractor:
raise NoTranscriptionError(element.id)
transcription = random.choice(transcriptions)
stripped_text = transcription.text.strip()
if not self.tokens:
return transcription.text.strip()
return stripped_text
entities = get_transcription_entities(
transcription.id,
......@@ -117,7 +118,7 @@ class ArkindexExtractor:
)
if not entities.count():
return transcription.text.strip()
return stripped_text
return self.translate(
entities_to_xml(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment