Skip to content

Commit

Permalink
Merge pull request #20 from bb-io/develop
Browse files Browse the repository at this point in the history
Updated names and documentation
  • Loading branch information
mathijs-bb authored Feb 25, 2025
2 parents 6401ab4 + 1914abf commit 806b87b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Apps.Widn/Actions/GlossaryActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public GlossaryActions(InvocationContext invocationContext, IFileManagementClien
_fileManagementClient = fileManagementClient;
}

[Action("Export glossary", Description = "Export glossary")]
[Action("Export glossary", Description = "Exports a glossary file to use with other applications")]
public async Task<ExportGlossaryResponse> ExportGlossary([ActionParameter] ExportGlossaryRequest input)
{
var endpointGlossaryData = $"/glossary/{input.GlossaryId}/item";
Expand Down Expand Up @@ -70,7 +70,7 @@ public async Task<ExportGlossaryResponse> ExportGlossary([ActionParameter] Expor
};
}

[Action("Import glossary", Description = "Import glossary")]
[Action("Import glossary", Description = "Imports a glossary that was exported from a different app")]
public async Task ImportGlossary([ActionParameter] ImportGlossaryRequest input)
{
var endpointGlossary = $"/glossary/{input.GlossaryId}";
Expand Down
4 changes: 2 additions & 2 deletions Apps.Widn/Actions/TranslationActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Apps.Widn.Actions;
[ActionList]
public class TranslationActions(InvocationContext invocationContext, IFileManagementClient fileManagementClient) : WidnInvocable(invocationContext)
{
[Action("Translate text", Description = "Translate a text by using model")]
[Action("Translate text", Description = "Translates a text given the selected model")]
public async Task<TextTranslationResponse> TranslateText([ActionParameter][Display("Source text")] string source, [ActionParameter] TranslateConfig config)
{
var request = new RestRequest("/translate", Method.Post);
Expand All @@ -36,7 +36,7 @@ public async Task<TextTranslationResponse> TranslateText([ActionParameter][Displ
};
}

[Action("Translate file", Description = "Translate a file by using model")]
[Action("Translate file", Description = "Translate a file given the selected model")]
public async Task<FileTranslationResponse> TranslateFile([ActionParameter] FileRequest fileRequest,
[ActionParameter] TranslateConfig config)
{
Expand Down
2 changes: 1 addition & 1 deletion Apps.Widn/Apps.Widn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<Product>Widn</Product>
<Description>Accurate translations, preserving meaning and nuance across +20 language pairs and various domains.</Description>
<Version>1.0.15</Version>
<Version>1.0.16</Version>
<AssemblyName>Apps.Widn</AssemblyName>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Apps.Widn/DataSources/Enums/EstimateModelDataHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class EstimateModelDataHandler : IStaticDataSourceItemHandler
{
public IEnumerable<DataSourceItem> GetData() => new List<DataSourceItem>()
{
new("mqm-qe", "Mqm-qe"),
new("xcomet-xl", "Xcomet-xl")
new("mqm-qe", "mqm-qe"),
new("xcomet-xl", "xcomet-xl")
};
}
}
6 changes: 3 additions & 3 deletions Apps.Widn/DataSources/Enums/ModelDataHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class ModelDataHandler : IStaticDataSourceItemHandler
{
public IEnumerable<DataSourceItem> GetData() => new List<DataSourceItem>()
{
new("anthill", "Anthill"),
new("sugarloaf", "Sugarloaf"),
new("vesuvius", "Vesuvius"),
new("anthill", "Anthill (fastest)"),
new("sugarloaf", "Sugarloaf (balance of speed & quality)"),
new("vesuvius", "Vesuvius (best model, for longer content)"),
};
}
}
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@

### **Translation**

- **Translate Text** translates plain text.
- **Translate text** translates plain text.
- **Translate file** translates a file. Widn supports many different file types. See Widn documentation.

Widn offers translation inputs for model selection, extra instructions, and a glossary.

### **Glossary**

- **Export glossary** exports a glossary file to use with other applications.
- **Import glossary** imports a glossary that was exported from a different app.

### **Quality**

- **Evaluate translation quality** evaluates the quality of a translation given a reference text using `xcomet-xl`.
- **Estimate translation quality** estimates the quality of a translation, without a reference text. You can choose between `xcomet-xl` and `mqm-qe`.
- **Estimate XLIFF translation quality** estimates the quality of an entire translated XLIFF file with the same options as the previous action.


![Frame 1](image/README/Instructions.png)

You can now translate files by uploading your file with the source and target languages. XLIFF translation is already available via the Widn API, alongside PDF and these other file types: [Supported File Formats](https://help.unbabel.com/hc/en-us/articles/11241362647447-Supported-file-formats).
Expand Down

0 comments on commit 806b87b

Please sign in to comment.