-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c8d598
commit a574439
Showing
30 changed files
with
595 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...l.Translation/Models/MonolingualCorpus.cs → ...Serval.Shared/Models/MonolingualCorpus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Serval.Translation.Models; | ||
namespace Serval.Shared.Models; | ||
|
||
public record MonolingualCorpus | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
...rc/Serval.Shared/Models/TrainingCorpus.cs → ...rval.Translation/Models/TrainingCorpus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Serval.Shared.Models; | ||
namespace Serval.Translation.Models; | ||
|
||
public record TrainingCorpus | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/Serval/src/Serval.WordAlignment/Contracts/ParallelCorpusFilterConfigDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Serval.WordAlignment.Contracts; | ||
|
||
public record ParallelCorpusFilterConfigDto | ||
{ | ||
public required string CorpusId { get; init; } | ||
public IReadOnlyList<string>? TextIds { get; init; } | ||
public string? ScriptureRange { get; init; } | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Serval/src/Serval.WordAlignment/Contracts/ParallelCorpusFilterDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Serval.WordAlignment.Contracts; | ||
|
||
public record ParallelCorpusFilterDto | ||
{ | ||
public required ResourceLinkDto Corpus { get; init; } | ||
public IReadOnlyList<string>? TextIds { get; init; } | ||
public string? ScriptureRange { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentCorpusConfigDto.cs
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentCorpusDto.cs
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentCorpusFileConfigDto.cs
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentCorpusFileDto.cs
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentCorpusUpdateConfigDto.cs
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentParallelCorpusConfigDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Serval.WordAlignment.Contracts; | ||
|
||
public record WordAlignmentParallelCorpusConfigDto | ||
{ | ||
/// <summary> | ||
/// The corpus name. | ||
/// </summary> | ||
public string? Name { get; init; } | ||
|
||
public required IReadOnlyList<string> SourceCorpusIds { get; init; } = new List<string>(); | ||
public required IReadOnlyList<string> TargetCorpusIds { get; init; } = new List<string>(); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentParallelCorpusDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Serval.WordAlignment.Contracts; | ||
|
||
public record WordAlignmentParallelCorpusDto | ||
{ | ||
public required string Id { get; init; } | ||
public required string Url { get; init; } | ||
public required ResourceLinkDto Engine { get; init; } | ||
public required IReadOnlyList<ResourceLinkDto> SourceCorpora { get; init; } | ||
public required IReadOnlyList<ResourceLinkDto> TargetCorpora { get; init; } | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Serval/src/Serval.WordAlignment/Contracts/WordAlignmentParallelCorpusUpdateDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Serval.WordAlignment.Contracts; | ||
|
||
public record WordAlignmentParallelCorpusUpdateConfigDto : IValidatableObject | ||
{ | ||
public IReadOnlyList<string>? SourceCorpusIds { get; init; } | ||
|
||
public IReadOnlyList<string>? TargetCorpusIds { get; init; } | ||
|
||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate( | ||
ValidationContext validationContext | ||
) | ||
{ | ||
if (SourceCorpusIds is null && TargetCorpusIds is null) | ||
{ | ||
yield return new System.ComponentModel.DataAnnotations.ValidationResult( | ||
"At least one field must be specified.", | ||
[nameof(SourceCorpusIds), nameof(TargetCorpusIds)] | ||
); | ||
} | ||
} | ||
} |
Oops, something went wrong.