Skip to content

Commit 1534627

Browse files
committed
Port tests
1 parent 16be8bf commit 1534627

4 files changed

Lines changed: 602 additions & 5 deletions

File tree

machine/corpora/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from .memory_stream_container import MemoryStreamContainer
1717
from .memory_text import MemoryText
1818
from .multi_key_ref import MultiKeyRef
19+
from .n_parallel_text_corpus import NParallelTextCorpus
20+
from .n_parallel_text_row import NParallelTextRow
1921
from .parallel_text_corpus import ParallelTextCorpus
2022
from .parallel_text_row import ParallelTextRow
2123
from .paratext_backup_terms_corpus import ParatextBackupTermsCorpus
@@ -121,6 +123,8 @@
121123
"nfkc_normalize",
122124
"nfkd_normalize",
123125
"normalize",
126+
"NParallelTextCorpus",
127+
"NParallelTextRow",
124128
"ParallelTextCorpus",
125129
"ParallelTextRow",
126130
"ParatextBackupTermsCorpus",

machine/corpora/n_parallel_text_corpus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _get_text_ids_from_corpora(self) -> Set[str]:
112112
text_ids = text_ids.union(all_rows_text_ids)
113113
return text_ids
114114

115-
def get_rows(self, text_ids: Optional[Iterable[str]]) -> Iterable[NParallelTextRow]:
115+
def get_rows(self, text_ids: Optional[Iterable[str]] = None) -> Iterable[NParallelTextRow]:
116116
filter_text_ids = self._get_text_ids_from_corpora()
117117
if text_ids is not None:
118118
filter_text_ids = filter_text_ids.intersection(text_ids)

0 commit comments

Comments
 (0)