Skip to content

Commit

Permalink
Change naming; using extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Nov 8, 2024
1 parent 4ec67d2 commit c9a1e23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ row.Ref is not ScriptureRef sr
if (sourceCorpora.Length == 0)
continue;

NParallelTextCorpus alignedSourceTrainingCorpora = new NParallelTextCorpus(sourceTrainingCorpora)
{
AllRowsList = Enumerable.Repeat(true, sourceTrainingCorpora.Length).ToArray()
};
ITextCorpus sourceTrainingCorpus = alignedSourceTrainingCorpora.SelectRandom(Seed);
NParallelTextCorpus alignedSourceTrainingCorpora = CorporaExtensions.AlignMany(

Check failure on line 94 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

The type or namespace name 'NParallelTextCorpus' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

'CorporaExtensions' does not contain a definition for 'AlignMany'

Check failure on line 94 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

The type or namespace name 'NParallelTextCorpus' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

'CorporaExtensions' does not contain a definition for 'AlignMany'
sourceTrainingCorpora,
Enumerable.Repeat(true, sourceTrainingCorpora.Length).ToArray()
);
ITextCorpus sourceTrainingCorpus = alignedSourceTrainingCorpora.ChooseRandom(Seed);
if (sourceTrainingCorpus.IsScripture())
{
sourceTrainingCorpus = sourceTrainingCorpus.Where(IsScriptureRow);
}

NParallelTextCorpus alignedTargetCorpora = new NParallelTextCorpus(targetTrainingCorpora)
{
AllRowsList = Enumerable.Repeat(true, targetTrainingCorpora.Length).ToArray()
};
ITextCorpus targetCorpus = alignedTargetCorpora.SelectFirst();
NParallelTextCorpus alignedTargetCorpora = CorporaExtensions.AlignMany(

Check failure on line 104 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

The type or namespace name 'NParallelTextCorpus' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 104 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

'CorporaExtensions' does not contain a definition for 'AlignMany'

Check failure on line 104 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

The type or namespace name 'NParallelTextCorpus' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 104 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

'CorporaExtensions' does not contain a definition for 'AlignMany'
targetTrainingCorpora,
Enumerable.Repeat(true, targetTrainingCorpora.Length).ToArray()
);
ITextCorpus targetCorpus = alignedTargetCorpora.ChooseFirst();

ITextCorpus targetTrainingCorpus = targetCorpus;
if (targetTrainingCorpus.IsScripture())
Expand Down Expand Up @@ -140,11 +140,11 @@ row.Ref is not ScriptureRef sr
}
}

NParallelTextCorpus alignedSourcePretranslateCorpora = new NParallelTextCorpus(sourcePretranslateCorpora)
{
AllRowsList = Enumerable.Repeat(true, sourcePretranslateCorpora.Length).ToArray()
};
ITextCorpus sourcePretranslateCorpus = alignedSourcePretranslateCorpora.SelectFirst();
NParallelTextCorpus alignedSourcePretranslateCorpora = CorporaExtensions.AlignMany(

Check failure on line 143 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

The type or namespace name 'NParallelTextCorpus' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 143 in src/ServiceToolkit/src/SIL.ServiceToolkit/Services/ParallelCorpusPreprocessingService.cs

View workflow job for this annotation

GitHub Actions / Build

'CorporaExtensions' does not contain a definition for 'AlignMany'
sourcePretranslateCorpora,
Enumerable.Repeat(true, sourcePretranslateCorpora.Length).ToArray()
);
ITextCorpus sourcePretranslateCorpus = alignedSourcePretranslateCorpora.ChooseFirst();

IParallelTextCorpus pretranslateCorpus = sourcePretranslateCorpus.AlignRows(
targetCorpus,
Expand Down
2 changes: 0 additions & 2 deletions src/ServiceToolkit/src/SIL.ServiceToolkit/Usings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using SIL.Machine.Corpora;
global using SIL.Machine.Utils;
global using SIL.Scripture;
global using SIL.ServiceToolkit.Models;
global using SIL.ServiceToolkit.Services;
global using SIL.ServiceToolkit.Utils;
Expand Down

0 comments on commit c9a1e23

Please sign in to comment.