Skip to content

Commit

Permalink
Property to field
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Nov 14, 2024
1 parent 37dde83 commit b3bd7b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SIL.Machine/Corpora/ParallelTextCorpus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ParallelTextCorpus(
TargetCorpus = targetCorpus;
AlignmentCorpus = alignmentCorpus ?? new DictionaryAlignmentCorpus();
RowRefComparer = rowRefComparer ?? new NParallelTextCorpus.DefaultRowRefComparer();
NParallelTextCorpus = new NParallelTextCorpus(new List<ITextCorpus> { SourceCorpus, TargetCorpus });
_nParallelTextCorpus = new NParallelTextCorpus(new List<ITextCorpus> { SourceCorpus, TargetCorpus });
}

public override bool IsSourceTokenized => SourceCorpus.IsTokenized;
Expand All @@ -31,15 +31,15 @@ public ParallelTextCorpus(
public IAlignmentCorpus AlignmentCorpus { get; }
public IComparer<object> RowRefComparer { get; }

public NParallelTextCorpus NParallelTextCorpus { get; }
private readonly NParallelTextCorpus _nParallelTextCorpus;

public override IEnumerable<ParallelTextRow> GetRows(IEnumerable<string> textIds)
{
using (IEnumerator<AlignmentRow> alignmentEnumerator = AlignmentCorpus.GetEnumerator())
{
NParallelTextCorpus.AllRows = new bool[] { AllSourceRows, AllTargetRows };
_nParallelTextCorpus.AllRows = new bool[] { AllSourceRows, AllTargetRows };
bool isScripture = SourceCorpus.IsScripture() && TargetCorpus.IsScripture();
foreach (var nRow in NParallelTextCorpus.GetRows(textIds))
foreach (var nRow in _nParallelTextCorpus.GetRows(textIds))
{
int compareAlignmentCorpus = -1;
if (AlignmentCorpus != null && nRow.NSegments.All(s => s.Count > 0))
Expand Down

0 comments on commit b3bd7b9

Please sign in to comment.