Gujarati OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, który pozwala programistom .NET na odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym w języku gujarati.
Jest to zaawansowana gałąź Tesseract, zbudowana wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem prędkości, jak i dokładności.
Zawartość IronOcr.Languages.Gujarati
Ta paczka zawiera 120 języków OCR dla .NET:
- Gujarati
- GujaratiBest
- GujaratiFast
- GujaratiAlphabet
- GujaratiAlphabetBest
- GujaratiAlphabetFast
Pobieranie
Gujarati Language Pack [ગજરાતી]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Gujarati do twojego projektu .NET.
Install-Package IronOcr.Languages.Gujarati
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w języku gujarati z obrazu lub dokumentu PDF.
// Import the IronOcr namespace to access OCR functionality
using IronOcr;
// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();
// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;
// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
// Perform OCR on the input document and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Display or use the extracted text as needed
Console.WriteLine(AllText);
}
// Import the IronOcr namespace to access OCR functionality
using IronOcr;
// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();
// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;
// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
// Perform OCR on the input document and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Display or use the extracted text as needed
Console.WriteLine(AllText);
}
' Import the IronOcr namespace to access OCR functionality
Imports IronOcr
' Create an instance of the IronTesseract class to handle the OCR process
Private Ocr = New IronTesseract()
' Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati
' Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
Using Input = New OcrInput("images\Gujarati.png")
' Perform OCR on the input document and obtain the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the OCR result
Dim AllText = Result.Text
' Display or use the extracted text as needed
Console.WriteLine(AllText)
End Using

