Slovene OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponenta oprogramowania C#, która umożliwia deweloperom .NET odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym w slowenskim. Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartość IronOcr.Languages.Slovene
Ten pakiet zawiera 46 języków OCR dla .NET:
- Slowenski
- SlowenskiBest
- SlowenskiFast
Pobieranie
Slovene Language Pack [slovenski jezik]
Instalacja
Pierwszą rzeczą, którą należy zrobić, jest zainstalowanie pakietu OCR Slowenski w projekcie .NET.
Install-Package IronOcr.Languages.Slovene
Przyklad kodu
Ten przykładowy kod C# pokazuje, jak odczytać slowenski tekst z obrazu lub dokumentu PDF.
// Install the package before using it.
// PM> Install-Package IronOcr.Languages.Slovene
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Slovene.
Ocr.Language = OcrLanguage.Slovene;
// Perform OCR inside a using block to ensure resources are released properly.
using (var Input = new OcrInput(@"images\Slovene.png"))
{
// Read the text from the input image or PDF.
var Result = Ocr.Read(Input);
// Get all the recognized text as a string.
var AllText = Result.Text;
// Output the recognized text to the console.
System.Console.WriteLine(AllText);
}
}
}
// Install the package before using it.
// PM> Install-Package IronOcr.Languages.Slovene
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for OCR operations.
var Ocr = new IronTesseract();
// Set the OCR language to Slovene.
Ocr.Language = OcrLanguage.Slovene;
// Perform OCR inside a using block to ensure resources are released properly.
using (var Input = new OcrInput(@"images\Slovene.png"))
{
// Read the text from the input image or PDF.
var Result = Ocr.Read(Input);
// Get all the recognized text as a string.
var AllText = Result.Text;
// Output the recognized text to the console.
System.Console.WriteLine(AllText);
}
}
}
' Install the package before using it.
' PM> Install-Package IronOcr.Languages.Slovene
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract for OCR operations.
Dim Ocr = New IronTesseract()
' Set the OCR language to Slovene.
Ocr.Language = OcrLanguage.Slovene
' Perform OCR inside a using block to ensure resources are released properly.
Using Input = New OcrInput("images\Slovene.png")
' Read the text from the input image or PDF.
Dim Result = Ocr.Read(Input)
' Get all the recognized text as a string.
Dim AllText = Result.Text
' Output the recognized text to the console.
System.Console.WriteLine(AllText)
End Using
End Sub
End Class

