Basque OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, pozwalający programistom .NET na odczyt tekstu z obrazów i dokumentów PDF w 126 językach, w tym baskijskim.
Jest to zaawansowana gałąź Tesseract, zbudowana wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem prędkości, jak i dokładności.
Zawartość IronOcr.Languages.Basque
Ten pakiet zawiera 43 języki OCR dla .NET:
- Basko
- BasqueBest
- BasqueFast
Pobieranie
Basque Language Pack [euskara]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Basko do projektu .NET.
Install-Package IronOcr.Languages.Basque
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w języku baskijskim z obrazu lub dokumentu PDF.
// Import the IronOcr namespace
using IronOcr;
class BasqueOCRExample
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Basque
Ocr.Language = OcrLanguage.Basque;
// Read the text from a Basque image or PDF
using (var Input = new OcrInput(@"images\Basque.png"))
{
// Perform OCR to get the result
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// Output the extracted text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class BasqueOCRExample
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the language to Basque
Ocr.Language = OcrLanguage.Basque;
// Read the text from a Basque image or PDF
using (var Input = new OcrInput(@"images\Basque.png"))
{
// Perform OCR to get the result
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// Output the extracted text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class BasqueOCRExample
Shared Sub Main()
' Create a new instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the language to Basque
Ocr.Language = OcrLanguage.Basque
' Read the text from a Basque image or PDF
Using Input = New OcrInput("images\Basque.png")
' Perform OCR to get the result
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' Output the extracted text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Ten kod konfiguruje silnik OCR wykorzystujący IronOCR specjalnie dla języka baskijskiego. Ładuje obraz (lub ścieżkę do PDF), aby wykonać OCR i wyodrębnić całą zawartość tekstową, która następnie jest wypisana na konsolę.

