diff --git a/src/SIL.Machine/Translation/IInteractiveTranslationModel.cs b/src/SIL.Machine/Translation/IInteractiveTranslationModel.cs index a9837c19..be448cdc 100644 --- a/src/SIL.Machine/Translation/IInteractiveTranslationModel.cs +++ b/src/SIL.Machine/Translation/IInteractiveTranslationModel.cs @@ -3,7 +3,7 @@ namespace SIL.Machine.Translation { - public interface IInteractiveTranslationModel : IInteractiveTranslationEngine, ITranslationModel + public interface IInteractiveTranslationModel : IInteractiveTranslationEngine, IWordAlignerEngine, ITranslationModel { Task SaveAsync(CancellationToken cancellationToken = default); void Save(); diff --git a/src/SIL.Machine/Translation/IWordAlignerEngine.cs b/src/SIL.Machine/Translation/IWordAlignerEngine.cs new file mode 100644 index 00000000..676f15e1 --- /dev/null +++ b/src/SIL.Machine/Translation/IWordAlignerEngine.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace SIL.Machine.Translation +{ + public interface IWordAlignerEngine : IDisposable + { + Task GetBestPhraseAlignmentAsync( + string sourceSegment, + string targetSegment, + CancellationToken cancellationToken = default + ); + + Task GetBestPhraseAlignmentAsync( + IReadOnlyList sourceSegment, + IReadOnlyList targetSegment, + CancellationToken cancellationToken = default + ); + + TranslationResult GetBestPhraseAlignment(string sourceSegment, string targetSegment); + + TranslationResult GetBestPhraseAlignment( + IReadOnlyList sourceSegment, + IReadOnlyList targetSegment + ); + } +}