Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmachapman committed Dec 2, 2024
1 parent 3a0dcc4 commit d25b782
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/ServalDownloader/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ TranslationParallelCorpus parallelCorpus in await translationEnginesClient.GetAl
Directory.CreateDirectory(parallelCorpusPath);
foreach (ResourceLink sourceCorpus in parallelCorpus.SourceCorpora)
{
// Create the source directory
string sourcePath = Path.Combine(parallelCorpusPath, "source");
Directory.CreateDirectory(sourcePath);

Corpus corpus = await corporaClient.GetAsync(sourceCorpus.Id);
foreach (CorpusFile corpusFile in corpus.Files)
{
// Create the source directory
string sourcePath = Path.Combine(parallelCorpusPath, "source");
Directory.CreateDirectory(sourcePath);

// Get the file extension
DataFile dataFile = await dataFilesClient.GetAsync(corpusFile.File.Id);
string extension = dataFile.Format == FileFormat.Paratext ? ".zip" : ".txt";
Expand All @@ -109,13 +109,13 @@ TranslationParallelCorpus parallelCorpus in await translationEnginesClient.GetAl

foreach (ResourceLink sourceCorpus in parallelCorpus.SourceCorpora)
{
// Create the target directory
string targetPath = Path.Combine(parallelCorpusPath, "target");
Directory.CreateDirectory(targetPath);

Corpus corpus = await corporaClient.GetAsync(sourceCorpus.Id);
foreach (CorpusFile corpusFile in corpus.Files)
{
// Create the target directory
string targetPath = Path.Combine(parallelCorpusPath, "target");
Directory.CreateDirectory(targetPath);

// Get the file extension
DataFile dataFile = await dataFilesClient.GetAsync(corpusFile.File.Id);
string extension = dataFile.Format == FileFormat.Paratext ? ".zip" : ".txt";
Expand Down

0 comments on commit d25b782

Please sign in to comment.