Skip to content

Commit

Permalink
return main_ann_store in plaintext parse
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzin3 committed Jul 11, 2024
1 parent c3100fe commit 802b2bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/openpecha/alignment/parsers/plaintext.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def parse(self, output_path: Path) -> Tuple[AnnotationStore, AnnotationStore]:
annotation_type=LayerEnum.comment,
)

source_ann_store = annotate_in_stam_model(
_, source_ann_store = annotate_in_stam_model(
source_ann_store, source_ann_metadata, output_path
)
target_ann_store = annotate_in_stam_model(
_, target_ann_store = annotate_in_stam_model(
target_ann_store, target_ann_metadata, output_path
)

Expand All @@ -82,7 +82,7 @@ def parse(self, output_path: Path) -> Tuple[AnnotationStore, AnnotationStore]:

def annotate_in_stam_model(
ann_store: AnnotationStore, ann_metadata: AnnotationMetadata, output_path: Path
) -> AnnotationStore:
) -> Tuple[AnnotationStore, AnnotationStore]:

"""create new annotation store for the given annotation layer"""
pecha_path = _mkdir(output_path / ann_store.id())
Expand Down Expand Up @@ -137,7 +137,7 @@ def annotate_in_stam_model(
)
save_annotation_store(ann_store, output_path, pecha_path / "annotation_store.json")

return new_ann_store
return (ann_store, new_ann_store)


def split_text_into_lines(text: str) -> List[str]:
Expand Down

0 comments on commit 802b2bb

Please sign in to comment.