Afrikaans OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının 126 dilde, Afrikanca da dâhil, görüntülerden ve PDF belgelerinden metin okumasına olanak tanıyan bir C# yazılım bileşenidir.
Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.
IronOcr.Languages.Afrikaans İçeriği
Bu paket, .NET için 52 OCR dili içerir:
- Afrikaanca
- AfrikaancaBest
- AfrikaancaFast
İndirme
Afrikaans Dil Paketi [Afrikaans]
Kurulum
Yapmamız gereken ilk şey, Afrikaans OCR paketimizi .NET projemize kurmaktır.
Install-Package IronOcr.Languages.Afrikaans
Kod Örneği
Bu C# kod örneği bir Görüntüden 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 kutuphanesine aittir ve OCR sürecini kurmak 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 süreci için giriş dosyasını kapsar. Çeşitli görüntü formatlarını ve PDF dosyalarını destekler.
- Ocr.Read(): Bu yöntem OCR sürecini yürütür ve tanınan metni sonucu bir nesneye sarılmış olarak döndürür.
- Result.Text: Bu özellik, giriş belgesinden çıkarılan metni içerir.

