OCR árabe en C# y .NET
Other versions of this document:
IronOCR es un componente de software C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el árabe.
Es una bifurcación avanzada de Tesseract, construida exclusivamente para desarrolladores .NET, y regularmente supera a otros motores Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Arabic
Este paquete contiene 108 idiomas de OCR para .NET:
- Árabe
- ÁrabeBest
- ÁrabeFast
- AlfabetoÁrabe
- AlfabetoÁrabeBest
- AlfabetoÁrabeFast
Descargar
Paquete de idioma árabe [العربية]
Instalación
Lo primero que tenemos que hacer es instalar el paquete OCR Árabe en tu proyecto .NET.
Install-Package IronOCR.Languages.Arabic
Ejemplo de código
Este ejemplo de código C# lee texto en árabe de una imagen o documento PDF.
// 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




