-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
419 additions
and
267 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SIL.Machine.Corpora; | ||
using SIL.ObjectModel; | ||
|
||
namespace SIL.Machine.Translation | ||
{ | ||
public interface IWordAlignmentEngine : IWordAligner, IDisposable | ||
{ | ||
IWordVocabulary SourceWords { get; } | ||
IWordVocabulary TargetWords { get; } | ||
IReadOnlySet<int> SpecialSymbolIndices { get; } | ||
|
||
IEnumerable<(string TargetWord, double Score)> GetTranslations(string sourceWord, double threshold = 0); | ||
IEnumerable<(int TargetWordIndex, double Score)> GetTranslations(int sourceWordIndex, double threshold = 0); | ||
|
||
double GetTranslationScore(string sourceWord, string targetWord); | ||
double GetTranslationScore(int sourceWordIndex, int targetWordIndex); | ||
|
||
IReadOnlyCollection<AlignedWordPair> GetBestAlignedWordPairs( | ||
IReadOnlyList<string> sourceSegment, | ||
IReadOnlyList<string> targetSegment | ||
); | ||
void ComputeAlignedWordPairScores( | ||
IReadOnlyList<string> sourceSegment, | ||
IReadOnlyList<string> targetSegment, | ||
IReadOnlyCollection<AlignedWordPair> wordPairs | ||
); | ||
} | ||
} |
Oops, something went wrong.