Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move logic to parallel text corpus #169

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

Enkidu93
Copy link
Collaborator

@Enkidu93 Enkidu93 commented Feb 7, 2024

When creating a ParallelTextCorpus, if target has no references, make target references source references changed to target versification.


This change is Reviewable

@Enkidu93 Enkidu93 requested a review from ddaspit February 7, 2024 23:14
Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this now mean that ParallelTextRow.TargetRefs will never be empty for Scripture? If so, we should update the return type for CorporaExtensions.ExtractScripture so that CorpusVerseRef is not nullable.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Enkidu93)


tests/SIL.Machine.Tests/Corpora/CorporaExtensionsTests.cs line 20 at r1 (raw file):

            Assert.That(text, Is.EqualTo(""));
            Assert.That(origRef, Is.EqualTo(new VerseRef("GEN 1:1", ScrVers.Original)));
            Assert.That(corpusRef.HasValue, Is.False);

Since corpusRef now has a value, can you add an assert for the correct value?


tests/SIL.Machine.Tests/Corpora/CorporaExtensionsTests.cs line 35 at r1 (raw file):

            Assert.That(text, Is.EqualTo("<range>"));
            Assert.That(origRef, Is.EqualTo(new VerseRef("1CH 12:4", ScrVers.Original)));
            Assert.That(corpusRef.HasValue, Is.False);

Since corpusRef now has a value, can you add an assert for the correct value?

Copy link
Collaborator Author

@Enkidu93 Enkidu93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done - should be

Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @ddaspit)


tests/SIL.Machine.Tests/Corpora/CorporaExtensionsTests.cs line 20 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Since corpusRef now has a value, can you add an assert for the correct value?

Done


tests/SIL.Machine.Tests/Corpora/CorporaExtensionsTests.cs line 35 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Since corpusRef now has a value, can you add an assert for the correct value?

Done

Copy link
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)

@Enkidu93 Enkidu93 merged commit 32a8471 into master Feb 8, 2024
4 checks passed
@ddaspit ddaspit deleted the parallel_corpus_versification_logic branch February 16, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants