OCR języka haitańskiego w C# i .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C# pozwalający programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym w haitań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.Haitian
Ten pakiet zawiera 46 języków OCR dla .NET:
- Haitian
- HaitianBest
- HaitianFast
Pobieranie
Haitian Language Pack [Kreyòl ayisyen]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Haitian do projektu .NET.
Przykład kodu
Ten przykład kodu C# odczytuje tekst w języku haitańskim z obrazu lub dokumentu PDF.
// Install the required IronOcr package
// PM> Install-Package IronOcr.Languages.Haitian
using IronOcr;
class HaitianOcrExample
{
static void Main()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian;
// Using the OcrInput class, define the path to the image or PDF
using (var Input = new OcrInput(@"images\Haitian.png"))
{
// Read the text from the image
var Result = Ocr.Read(Input);
// Extract the text found in the image
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}' Install the required IronOcr package
' PM> Install-Package IronOcr.Languages.Haitian
Imports IronOcr
Class HaitianOcrExample
Shared Sub Main()
' Initialize the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian
' Using the OcrInput class, define the path to the image or PDF
Using Input = New OcrInput("images\Haitian.png")
' Read the text from the image
Dim Result = Ocr.Read(Input)
' Extract the text found in the image
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class' Install the required IronOcr package
' PM> Install-Package IronOcr.Languages.Haitian
Imports IronOcr
Class HaitianOcrExample
Shared Sub Main()
' Initialize the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian
' Using the OcrInput class, define the path to the image or PDF
Using Input = New OcrInput("images\Haitian.png")
' Read the text from the image
Dim Result = Ocr.Read(Input)
' Extract the text found in the image
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class- Ten fragment kodu demonstruje, jak zaimplementować OCR przy użyciu biblioteki IronTesseract do odczytywania tekstu w języku haitańskim z obrazów lub dokumentów PDF. Upewnij się, że obraz lub PDF znajduje się w określonej ścieżce. Ten przykład zakłada, że pracujesz w środowisku deweloperskim kompatybilnym z .NET.
Curtis Chau posiada tytuł licencjata z informatyki (Uniwersytet Carleton) i specjalizuje się w front-endowym rozwoju, z ekspertką w Node.js, TypeScript, JavaScript i React. Pasjonuje się tworzeniem intuicyjnych i estetycznie przyjemnych interfejsów użytkownika, Curtis cieszy się pracą z nowoczesnymi frameworkami i tworzeniem dobrze zorganizowanych, atrakcyjnych wizualnie podręczników.