Arabic OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, .NET yazılımcılarının resimlerden ve PDF belgelerinden metin okumalarını sağlayan bir C# yazılım bileşenidir ve Arapça dahil 126 dili destekler.

Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.Arabic İçeriği

Bu paket, .NET için 108 OCR dili içerir:

  • Arapça
  • ArapçaBest
  • ArapçaFast
  • ArapçaAlfabe
  • ArapçaAlfabeBest
  • ArapçaAlfabeFast

İndirme

Arapça Dil Paketi [العربية]

  • Şu şekilde indir: Zip
  • Şu ile yükleyin: NuGet

Kurulum

Yapmamız gereken ilk şey, Arapça OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Arabic

Kod Örneği

Bu C# kod örneği, bir resim veya PDF belgesinden Arapça metin okur.

// Import the IronOcr namespace to use its classes.
using IronOcr;

// Create a new instance of the IronTesseract class.
var Ocr = new IronTesseract();

// Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic;

// Use a using statement to ensure that resources are disposed of correctly.
using (var Input = new OcrInput(@"images\Arabic.png"))
{
    // Perform OCR on the input image or document.
    var Result = Ocr.Read(Input);

    // Retrieve all recognized text from the document.
    var AllText = Result.Text;

    // Optionally, you can output the text to the console or use it otherwise.
    // Console.WriteLine(AllText);
}
// Import the IronOcr namespace to use its classes.
using IronOcr;

// Create a new instance of the IronTesseract class.
var Ocr = new IronTesseract();

// Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic;

// Use a using statement to ensure that resources are disposed of correctly.
using (var Input = new OcrInput(@"images\Arabic.png"))
{
    // Perform OCR on the input image or document.
    var Result = Ocr.Read(Input);

    // Retrieve all recognized text from the document.
    var AllText = Result.Text;

    // Optionally, you can output the text to the console or use it otherwise.
    // Console.WriteLine(AllText);
}
' Import the IronOcr namespace to use its classes.
Imports IronOcr

' Create a new instance of the IronTesseract class.
Private Ocr = New IronTesseract()

' Set the OCR language to Arabic.
Ocr.Language = OcrLanguage.Arabic

' Use a using statement to ensure that resources are disposed of correctly.
Using Input = New OcrInput("images\Arabic.png")
	' Perform OCR on the input image or document.
	Dim Result = Ocr.Read(Input)

	' Retrieve all recognized text from the document.
	Dim AllText = Result.Text

	' Optionally, you can output the text to the console or use it otherwise.
	' Console.WriteLine(AllText);
End Using
$vbLabelText   $csharpLabel