-
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.
Merge pull request #3 from bb-io/develop
Updated response display translation text
- Loading branch information
Showing
4 changed files
with
57 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Blackbird.Applications.Sdk.Common; | ||
|
||
namespace Apps.Systran.Models.Response | ||
{ | ||
public class TranslateText | ||
{ | ||
[Display("Request ID")] | ||
public string RequestId { get; set; } = string.Empty; | ||
|
||
[Display("Outputs")] | ||
public List<TranslationOutput> Outputs { get; set; } = new(); | ||
} | ||
|
||
public class TranslationOutput | ||
{ | ||
[Display("Info")] | ||
public TranslationInfo? Info { get; set; } | ||
|
||
[Display("Translated text")] | ||
public string Output { get; set; } = string.Empty; | ||
|
||
[Display("Back translation")] | ||
public string? BackTranslation { get; set; } | ||
|
||
[Display("Source text")] | ||
public string? Source { get; set; } | ||
} | ||
|
||
public class TranslationInfo | ||
{ | ||
[Display("Language identification")] | ||
public LanguageIdentification? Lid { get; set; } | ||
|
||
} | ||
|
||
public class LanguageIdentification | ||
{ | ||
[Display("Language")] | ||
public string Language { get; set; } = string.Empty; | ||
|
||
[Display("Confidence level")] | ||
public float Confidence { get; set; } | ||
} | ||
} |
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,44 +1,14 @@ | ||
using Blackbird.Applications.Sdk.Common; | ||
| ||
|
||
using Blackbird.Applications.Sdk.Common; | ||
using Newtonsoft.Json; | ||
|
||
namespace Apps.Systran.Models.Response | ||
{ | ||
public class TranslateTextResponse | ||
{ | ||
[Display("Request ID")] | ||
public string RequestId { get; set; } = string.Empty; | ||
|
||
[Display("Outputs")] | ||
public List<TranslationOutput> Outputs { get; set; } = new(); | ||
} | ||
|
||
public class TranslationOutput | ||
{ | ||
[Display("Info")] | ||
public TranslationInfo? Info { get; set; } | ||
|
||
[Display("Translated text")] | ||
public string Output { get; set; } = string.Empty; | ||
|
||
[Display("Back translation")] | ||
public string? BackTranslation { get; set; } | ||
|
||
[Display("Source text")] | ||
public string? Source { get; set; } | ||
} | ||
|
||
public class TranslationInfo | ||
{ | ||
[Display("Language identification")] | ||
public LanguageIdentification? Lid { get; set; } | ||
|
||
} | ||
|
||
public class LanguageIdentification | ||
{ | ||
[Display("Language")] | ||
public string Language { get; set; } = string.Empty; | ||
|
||
[Display("Confidence level")] | ||
public float Confidence { get; set; } | ||
[JsonProperty("output")] | ||
public string Output { get; set; } | ||
} | ||
} |