Breton OCR in C# and .NET

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

126 Weitere Sprachen

IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Bretonisch, zu lesen. Es ist ein erweiterter Fork von Tesseract, der ausschließlich für .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.

Inhalt von IronOcr.Languages.Breton

Dieses Paket enthält 43 OCR-Sprachen für .NET:

  • Bretonisch
  • BretonischBest
  • BretonischFast

Download

Bretonisches Sprachpaket [brezhoneg]

  • Als Zip herunterladen
  • Mit NuGet installieren

Installation

Das Erste, was wir tun müssen, ist unser Breton OCR-Paket in Ihr .NET-Projekt zu installieren.

Install-Package IronOCR.Languages.Breton

Beispielcode

Dieses C#-Codebeispiel liest bretonischen Text aus einem Bild- oder PDF-Dokument.

// Import the IronOCR namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Breton
        Ocr.Language = OcrLanguage.Breton;

        // Read text from a Breton image or PDF document
        using (var Input = new OcrInput(@"images\Breton.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

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

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOCR namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Breton
        Ocr.Language = OcrLanguage.Breton;

        // Read text from a Breton image or PDF document
        using (var Input = new OcrInput(@"images\Breton.png"))
        {
            // Perform OCR on the input
            var Result = Ocr.Read(Input);

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

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOCR namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Breton
		Ocr.Language = OcrLanguage.Breton

		' Read text from a Breton image or PDF document
		Using Input = New OcrInput("images\Breton.png")
			' Perform OCR on the input
			Dim Result = Ocr.Read(Input)

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

			' Output the extracted text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Dieses Beispiel zeigt, wie man die IronOCR-Bibliothek verwendet, um OCR auf einem bretonischen Textbild durchzuführen.
  • IronTesseract bietet die Kernfunktionalität für OCR.
  • Das OcrInput wird mit dem Pfad zum Bild erstellt, das bretonischen Text enthält.
  • Die Read-Methode verarbeitet das Eingabebild und extrahiert Text, der dann in der Konsole ausgegeben wird.