Nepali OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Inne wersje tego dokumentu:

IronOCR to komponent oprogramowania C# umożliwiający programistom .NET odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym nepalskim.

Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.

Zawartość IronOcr.Languages.Nepali

Ten pakiet zawiera 43 języki OCR dla .NET:

  • Nepalski
  • NepaliBest
  • NepaliFast

Pobieranie

Nepali Language Pack [नपाली]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Nepali w projekcie .NET.

Install-Package IronOcr.Languages.Nepali

Przyklad kodu

Ten przykład kodu C# odczytuje nepalski tekst z obrazu lub dokumentu PDF.

// First, ensure the IronOCR and the Nepali language pack are installed:
// PM> Install-Package IronOcr.Languages.Nepali

// Import the IronOcr namespace to access the required OCR functionalities.
using IronOcr;

class NepaliOcrExample
{
    public void ReadNepaliText()
    {
        // Create an instance of IronTesseract, the main class for performing OCR tasks.
        var Ocr = new IronTesseract();

        // Set the language to Nepali. Ensure you have the Nepali language package installed.
        Ocr.Language = OcrLanguage.Nepali;

        // Specify the input image or PDF file which contains Nepali text.
        using (var Input = new OcrInput(@"images\Nepali.png"))
        {
            // Perform the OCR operation on the input and get the result.
            var Result = Ocr.Read(Input);

            // Extract the recognized text from the result.
            var AllText = Result.Text;

            // Print the recognized text to the console.
            System.Console.WriteLine(AllText);
        }
    }
}
// First, ensure the IronOCR and the Nepali language pack are installed:
// PM> Install-Package IronOcr.Languages.Nepali

// Import the IronOcr namespace to access the required OCR functionalities.
using IronOcr;

class NepaliOcrExample
{
    public void ReadNepaliText()
    {
        // Create an instance of IronTesseract, the main class for performing OCR tasks.
        var Ocr = new IronTesseract();

        // Set the language to Nepali. Ensure you have the Nepali language package installed.
        Ocr.Language = OcrLanguage.Nepali;

        // Specify the input image or PDF file which contains Nepali text.
        using (var Input = new OcrInput(@"images\Nepali.png"))
        {
            // Perform the OCR operation on the input and get the result.
            var Result = Ocr.Read(Input);

            // Extract the recognized text from the result.
            var AllText = Result.Text;

            // Print the recognized text to the console.
            System.Console.WriteLine(AllText);
        }
    }
}
' First, ensure the IronOCR and the Nepali language pack are installed:
' PM> Install-Package IronOcr.Languages.Nepali

' Import the IronOcr namespace to access the required OCR functionalities.
Imports IronOcr

Friend Class NepaliOcrExample
	Public Sub ReadNepaliText()
		' Create an instance of IronTesseract, the main class for performing OCR tasks.
		Dim Ocr = New IronTesseract()

		' Set the language to Nepali. Ensure you have the Nepali language package installed.
		Ocr.Language = OcrLanguage.Nepali

		' Specify the input image or PDF file which contains Nepali text.
		Using Input = New OcrInput("images\Nepali.png")
			' Perform the OCR operation on the input and get the result.
			Dim Result = Ocr.Read(Input)

			' Extract the recognized text from the result.
			Dim AllText = Result.Text

			' Print the recognized text to the console.
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel