OpenTranslate-beta
1.0.0.8
dotnet add package OpenTranslate-beta --version 1.0.0.8
NuGet\Install-Package OpenTranslate-beta -Version 1.0.0.8
<PackageReference Include="OpenTranslate-beta" Version="1.0.0.8" />
paket add OpenTranslate-beta --version 1.0.0.8
#r "nuget: OpenTranslate-beta, 1.0.0.8"
// Install OpenTranslate-beta as a Cake Addin
#addin nuget:?package=OpenTranslate-beta&version=1.0.0.8
// Install OpenTranslate-beta as a Cake Tool
#tool nuget:?package=OpenTranslate-beta&version=1.0.0.8
OpenTranslate
OpenTranslate is an open-source translation engine that offers quality translations for various applications. It supports asynchronous usage, providing versatility for different use cases. OpenTranslate is a practical solution for those seeking reliable translations with a balance between performance and resource efficiency.
Optimizations
We've made several enhancements to OpenTranslate to make it even better for you: We have fixed the json mismatch errors and we have updated the samples. Better error handling: We understand that errors can be frustrating, so we've improved our error handling to provide more informative feedback and recover smoothly from unexpected situations. Squashing bugs: We found and fixed some pesky bugs that caused empty JSON strings to be returned, making the package more reliable and stable for you to use. OCR document translations: We wanted to make OpenTranslate even more versatile, so we added Optical Character Recognition (OCR) support for document translations. Now, you can translate documents with ease, saving you time and effort.
Package Dependencies
Package | Version |
---|---|
Newtonsoft.Json | 13.0.3 |
IronOcr | 2023.4.13 |
IronOcr.MacOs | 2023.4.13 |
Usage/Examples
GetTranslation(Sentence or Phrase, laguage from, language to);
Languages need to be specified in ISO 639-1 format like below:
using OpenTranslate;
var engine = new OpenTranslateClient();
string json = await engine.GetTranslation("Hello, May the force be with you.", "es");
Results results = JsonSerializer.Deserialize<Results>(json);
Console.Write("Your Translation: " + results.Translation + Environment.NewLine +
"Match Accuracy: " + results.MatchPercentage);
internal class Results
{
public string Translation { get; set; }
public string OriginText { get; set; }
public string MatchPercentage { get; set; }
public string LangFrom { get; set; }
public string LangTo { get; set; }
}
GetDocumentTraslation(Document Path, isoLanguageFrom, isoLanguageTo)
Languages need to be specified in ISO 639-1 format like below:
using OpenTranslate;
var engine = new OpenTranslateClient();
string json = await engine.GetDocumentTranslation("doc.pdf", "en", "es");
Results results = JsonSerializer.Deserialize<Results>(json);
Console.Write("Your Translation: " + results.Translation + Environment.NewLine +
"Match Accuracy: " + results.MatchPercentage);
internal class Results
{
public string Translation { get; set; }
public string OriginText { get; set; }
public string MatchPercentage { get; set; }
public string LangFrom { get; set; }
public string LangTo { get; set; }
}
Roadmap
- Add OCR image translations.(currently we have started development on this.)
- Add code and performance optimisation.
- Remove all usage limits to avoid limiting the free opensource product.
License
Support
For support, email WebsiterzTech@gmail.com.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- IronOcr (>= 2023.4.13)
- IronOcr.MacOs (>= 2023.4.13)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
This is our eighth official beta release.
We have removed our previous limitations and are in the testing phase.
We have also added ocr document translations