Occitan OCR in C# and .NET
IronOCR to komponent oprogramowania C#, umożliwiający programistom .NET odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym w oksytańskim. Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartość IronOcr.Languages.Occitan
Ten pakiet zawiera 46 języków OCR dla .NET:
- Oksytański
- OksytańskiBest
- OksytańskiFast
Pobieranie
Pakiet językowy oksytański
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR języka oksytańskiego w Twoim projekcie .NET.
Install-Package IronOcr.Languages.Occitan
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w języku oksytańskim z obrazu lub dokumentu PDF.
// Importing the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the OCR engine for Occitan language
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Occitan;
// Use a using block for proper disposal of resources
using (var Input = new OcrInput(@"images\Occitan.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
// Importing the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the OCR engine for Occitan language
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Occitan;
// Use a using block for proper disposal of resources
using (var Input = new OcrInput(@"images\Occitan.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
' Importing the IronOCR namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the OCR engine for Occitan language
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Occitan
' Use a using block for proper disposal of resources
Using Input = New OcrInput("images\Occitan.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Ten przykład demonstruje, jak skonfigurować bibliotekę IronOCR do odczytywania tekstu z pliku obrazu zawierającego tekst w języku oksytańskim. Ustawia język OCR na oksytański i przetwarza obraz, wyświetlając rozpoznany tekst.

