Afrikaans OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die es .NET-Programmierern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, darunter Afrikaans, zu lesen.
Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalte von IronOcr.Languages.Afrikaans
Dieses Paket enthält 52 OCR-Sprachen for .NET:
- Afrikaans
- AfrikaansBest
- AfrikaansFast
Download
Afrikaans-Sprachpaket [Afrikaans]
Installation
Das Erste, was wir tun müssen, ist, unser Afrikaans OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Afrikaans
Beispielcode
Dieses C#-Codebeispiel liest Afrikaans-Text aus einem Bild- oder PDF-Dokument.
// First, ensure the IronOcr.Languages.Afrikaans package is installed in your project.
// This example requires the IronOcr C# package to read text from images or PDFs.
using IronOcr;
var Ocr = new IronTesseract(); // Initialize the IronTesseract class
Ocr.Language = OcrLanguage.Afrikaans; // Set the language to Afrikaans
// Load the image or PDF document into an OcrInput object
using (var Input = new OcrInput(@"images\Afrikaans.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Retrieve the complete recognized text
var AllText = Result.Text;
// Output the recognized text (this step is customizable for your use-case)
Console.WriteLine(AllText);
}
// First, ensure the IronOcr.Languages.Afrikaans package is installed in your project.
// This example requires the IronOcr C# package to read text from images or PDFs.
using IronOcr;
var Ocr = new IronTesseract(); // Initialize the IronTesseract class
Ocr.Language = OcrLanguage.Afrikaans; // Set the language to Afrikaans
// Load the image or PDF document into an OcrInput object
using (var Input = new OcrInput(@"images\Afrikaans.png"))
{
// Perform OCR on the input document
var Result = Ocr.Read(Input);
// Retrieve the complete recognized text
var AllText = Result.Text;
// Output the recognized text (this step is customizable for your use-case)
Console.WriteLine(AllText);
}
' First, ensure the IronOcr.Languages.Afrikaans package is installed in your project.
' This example requires the IronOcr C# package to read text from images or PDFs.
Imports IronOcr
Private Ocr = New IronTesseract() ' Initialize the IronTesseract class
Ocr.Language = OcrLanguage.Afrikaans ' Set the language to Afrikaans
' Load the image or PDF document into an OcrInput object
Using Input = New OcrInput("images\Afrikaans.png")
' Perform OCR on the input document
Dim Result = Ocr.Read(Input)
' Retrieve the complete recognized text
Dim AllText = Result.Text
' Output the recognized text (this step is customizable for your use-case)
Console.WriteLine(AllText)
End Using
Erklärung:
- IronTesseract: Diese Klasse ist Teil der IronOCR-Bibliothek und wird für die Einrichtung des OCR-Prozesses verwendet.
- OcrLanguage: Diese Eigenschaft legt die Sprache für OCR fest. Hier ist es auf Afrikaans eingestellt.
- OcrInput: Diese Klasse kapselt die Eingabedatei für den OCR-Prozess. Es unterstützt verschiedene Bildformate und PDF-Dateien.
- Ocr.Read(): Diese Methode führt den OCR-Prozess aus und gibt den erkannten Text in einem Ergebnisobjekt zurück.
- Result.Text: Diese Eigenschaft enthält den aus dem Eingabedokument extrahierten Text.

