Kyrgyz OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR jest komponentem oprogramowania C#, który pozwala programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 jezykach, w tym kirgiskim.
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.
Zawartosc IronOcr.Languages.Kyrgyz
Ten pakiet zawiera 43 języki OCR dla .NET:
- Kirgiski
- KyrgyzBest
- KyrgyzFast
Pobieranie
Kyrgyz Language Pack [Кыргызча]
Instalacja
Pierwsza rzecz, ktora musimy zrobic, to zainstalowac nasz pakiet OCR Kirgiska do projektu .NET.
Install-Package IronOcr.Languages.Kyrgyz
Przyklad kodu
Ten przyklad kodu C# odczytuje kirgiski tekst z obrazu lub dokumentu PDF.
// Import the IronOcr namespace
using IronOcr;
public class KyrgyzOcrExample
{
public void PerformOcr()
{
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the OCR language to Kyrgyz
Ocr.Language = OcrLanguage.Kyrgyz;
// Define the input using an image file path
using (var Input = new OcrInput(@"images\Kyrgyz.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extracted text from the image
string AllText = Result.Text;
// Output the extracted text (or use it in your application as needed)
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
public class KyrgyzOcrExample
{
public void PerformOcr()
{
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Set the OCR language to Kyrgyz
Ocr.Language = OcrLanguage.Kyrgyz;
// Define the input using an image file path
using (var Input = new OcrInput(@"images\Kyrgyz.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extracted text from the image
string AllText = Result.Text;
// Output the extracted text (or use it in your application as needed)
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Public Class KyrgyzOcrExample
Public Sub PerformOcr()
' Initialize IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Set the OCR language to Kyrgyz
Ocr.Language = OcrLanguage.Kyrgyz
' Define the input using an image file path
Using Input = New OcrInput("images\Kyrgyz.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Extracted text from the image
Dim AllText As String = Result.Text
' Output the extracted text (or use it in your application as needed)
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Ten blok kodu inicjalizuje obiekt
IronTesseractdo wykonania OCR. - Ustawia jezyk na kirgiski przy uzyciu wyliczenia
OcrLanguage.Kyrgyz. - Klasa
OcrInputjest uzywana do okreslenia sciezki pliku obrazu, z ktorego tekst zostanie wyodrebniony. Ocr.Read(Input)przeprowadza proces OCR i dostarcza wynik zawierajacy wyodrebniony tekst dostepny przezResult.Text.- Na koniec,
Console.WriteLine(AllText)wypisuje wyodrebniony tekst na konsole.

