Nepali OCR in C# and .NET

Other versions of this document:

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Nepali.

It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.

Contents of IronOcr.Languages.Nepali

This package contains 43 OCR languages for .NET:

  • Nepali
  • NepaliBest
  • NepaliFast

Download

Nepali Language Pack [नेपाली]

Installation

The first thing we have to do is install our Nepali OCR package to your .NET project.

Install-Package IronOcr.Languages.Nepali

Code Example

This C# code example reads Nepali text from an Image or PDF document.

// 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