Maltese OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET yazılımcılarının 126 dilde, Maltaca da dahil olmak üzere, görüntüler ve PDF belgelerinden metin okumasına izin veren 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.Maltese İçeriği
Bu paket, .NET için 46 OCR dili içerir:
- Maltaca
- MalteseBest
- MalteseFast
İndirme
Maltaca Dil Paketi [Malti]
Kurulum
İlk yapmamız gereken şey, .NET projenize Maltaca OCR paketimizi kurmaktır.
Install-Package IronOcr.Languages.Maltese
Kod Örneği
Bu C# kod örneği, Maltaca metni bir görüntüden veya PDF belgesinden okur.
// 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 Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
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 Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
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 Maltese
Ocr.Language = OcrLanguage.Maltese
' Define the input image or PDF document
Using Input = New OcrInput("images\Maltese.png")
' Perform OCR on the input and retrieve the result
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Bu örnekte, IronTesseract OCR motoru Maltese.png adlı bir görüntü dosyasından metin okumak için kullanılmaktadır. Tanınan metin daha sonra konsola yazdırılır. Görüntü yolunun doğru olduğundan ve görüntü dosyasının Maltaca metin içerdiğinden emin olun, böylece OCR etkili çalışabilir. using ifadesi, kaynakların artık gerekli olmadığında düzgün bir şekilde bırakılmasını sağlar.

