Occitan OCR in C# and .NET

126 More Languages

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Occitan. 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.Occitan

This package contains 46 OCR languages for .NET:

  • Occitan
  • OccitanBest
  • OccitanFast

Download

Occitan Language Pack

Installation

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

Install-Package IronOCR.Languages.Occitan

Code Example

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

// Importing the IronOCR namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of the OCR engine for Occitan language
        var Ocr = new IronTesseract();
        Ocr.Language = OcrLanguage.Occitan;

        // Use a using block for proper disposal of resources
        using (var Input = new OcrInput(@"images\Occitan.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Importing the IronOCR namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of the OCR engine for Occitan language
        var Ocr = new IronTesseract();
        Ocr.Language = OcrLanguage.Occitan;

        // Use a using block for proper disposal of resources
        using (var Input = new OcrInput(@"images\Occitan.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Importing the IronOCR namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create a new instance of the OCR engine for Occitan language
		Dim Ocr = New IronTesseract()
		Ocr.Language = OcrLanguage.Occitan

		' Use a using block for proper disposal of resources
		Using Input = New OcrInput("images\Occitan.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Retrieve the recognized text
			Dim AllText = Result.Text

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

This example demonstrates how to configure the IronOCR library to read text from an image file containing Occitan text. It sets the OCR language to Occitan and processes the image, outputting the recognized text.