Bosnian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, 126 dilde, Boşnakça da dahil olmak üzere, .NET kodlayıcılarının görüntülerden ve PDF belgelerinden metin okumasına olanak tanıyan bir C# yazılım bileşenidir.

Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.Bosnian içeriği

Bu paket, .NET için 46 OCR dili içerir:

  • Boşnakça
  • Boşnakça En İyi
  • Boşnakça Hızlı

İndirme

Boşnakça Dil Paketi [bosanski jezik]

Kurulum

İlk yapmamız gereken, .NET projenize Boşnakça OCR paketimizi yüklemektir.

Install-Package IronOcr.Languages.Bosnian

Kod Örneği

Bu C# kod örneği, bir görüntüden veya PDF belgesinden Boşnakça metni okur.

// Ensure the IronOCR library is included
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize an instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Use OcrInput to specify the input file path for OCR
        using (var Input = new OcrInput(@"images\Bosnian.png"))
        {
            // Perform OCR on the input image or PDF
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Ensure the IronOCR library is included
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize an instance of IronTesseract
        var Ocr = new IronTesseract();

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

        // Use OcrInput to specify the input file path for OCR
        using (var Input = new OcrInput(@"images\Bosnian.png"))
        {
            // Perform OCR on the input image or PDF
            var Result = Ocr.Read(Input);

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

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Ensure the IronOCR library is included
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize an instance of IronTesseract
		Dim Ocr = New IronTesseract()

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

		' Use OcrInput to specify the input file path for OCR
		Using Input = New OcrInput("images\Bosnian.png")
			' Perform OCR on the input image or PDF
			Dim Result = Ocr.Read(Input)

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

			' Output the recognized text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Yukarıdaki kod, IronOCR kullanarak Boşnakça bir metin görüntüsünde OCR yapmayı gösterir.
  • IronTesseract sınıfı OCR görevlerini yapılandırmak ve yürütmek için kullanılır.
  • OcrInput sınıfı, metnin çıkarılacağı giriş görüntü dosyasını belirtmek için kullanılır.
  • Son olarak, tanınan metin konsola yazdırılır.