Afrikaans OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının Afrikaans dahil 126 dilde, görüntülerden ve PDF belgelerden metin okumasına izin veren bir C# yazılım bileşenidir.
Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Afrikaans İçeriği
Bu paket, .NET için 52 OCR dilini içerir:
- Afrikaans
- AfrikaansBest
- AfrikaansFast
İndir
Afrikaans Dil Paketi [Afrikaans]
Kurulum
Yapmamız gereken ilk şey, Afrikaans OCR paketimizi .NET projenize kurmaktır.
Install-Package IronOcr.Languages.Afrikaans
Kod Örneği
Bu C# kod örneği, bir Görüntü veya PDF belgesinden Afrikaans metni okur.
// 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
Açıklama:
- IronTesseract: Bu sınıf, IronOCR kütüphanesinin bir parçasıdır ve OCR işleminin ayarlanması için kullanılır.
- OcrLanguage: Bu özellik, OCR için dili ayarlar. Burada Afrikaans olarak ayarlanmıştır.
- OcrInput: Bu sınıf, OCR işlemi için giriş dosyasını kapsar. Çeşitli görüntü formatlarını ve PDF dosyalarını destekler.
- Ocr.Read(): Bu yöntem, OCR işlemini gerçekleştirir ve bir sonuç nesnesine sarılmış tanınan metni döndürür.
- Result.Text: Bu özellik, giriş belgesinden çıkarılan metni içerir.

