Polish OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET geliştiricilerinin Lehçe dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumalarına olanak tanıyan C# yazılım bileşenidir. Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Polish İçeriği
Bu paket, .NET için 43 OCR dili içerir:
- Lehçe
- LehçeBest
- LehçeFast
İndir
Lehçe Dil Paketi [język polski]:
- ZIP olarak indir
- NuGet ile yükleyin
Kurulum
Yapmamız gereken ilk şey, .NET projenize Lehçe OCR paketini yüklemek.
NuGet Paket Yöneticisi kullanılarak yüklemek için aşağıdaki komutu uygulayın:
Install-Package IronOcr.Languages.Polish
Kod Örneği
Bu C# kod örneği, IronOCR kullanarak bir görüntü veya PDF belgesinden Lehçe metnini nasıl okuyacağınızı göstermektedir.
// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}
' Install the IronOcr.Languages.Polish package via NuGet before using this code.
Imports IronOcr
Public Class PolishOcrExample
Public Sub ReadPolishTextFromImage()
' Initialize the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the language to Polish
Ocr.Language = OcrLanguage.Polish
' Provide the path to the image or PDF file containing Polish text
Using Input = New OcrInput("images\Polish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Display or process the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Bu betik, OCR motorunu başlatır, dili (Lehçe) belirtir ve "images\Polish.png" konumundaki görüntüyü işleyerek metni çıkarır ve görüntüler. Dosya yolunun doğru olduğundan ve OCR paketinin yüklü olduğundan emin olun.

