Skip to content

Commit

Permalink
a start
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Nov 5, 2024
1 parent 7f2af4e commit 16fb76d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
29 changes: 29 additions & 0 deletions src/SIL.Machine/Translation/IWordAlignerEngine.cs
Original file line number Diff line number Diff line change
@@ -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<TranslationResult> GetBestPhraseAlignmentAsync(
string sourceSegment,
string targetSegment,
CancellationToken cancellationToken = default
);

Task<TranslationResult> GetBestPhraseAlignmentAsync(
IReadOnlyList<string> sourceSegment,
IReadOnlyList<string> targetSegment,
CancellationToken cancellationToken = default
);

TranslationResult GetBestPhraseAlignment(string sourceSegment, string targetSegment);

TranslationResult GetBestPhraseAlignment(
IReadOnlyList<string> sourceSegment,
IReadOnlyList<string> targetSegment
);
}
}

0 comments on commit 16fb76d

Please sign in to comment.