Tibetan Alphabet OCR in C# and .NET
IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, y compris l'alphabet tibétain.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET, et elle surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.Tibetan
Ce package contient 114 langues OCR for .NET :
- Tibétain
- TibétainBest
- Jeûne tibétain
- Alphabet tibétain
- Alphabet tibétainBest
- Alphabet tibétain rapide
Télécharger
Pack de langue alphabet tibétain [Standard tibétain]
Installation
La première chose à faire est d'installer le package OCR de l'alphabet tibétain sur votre projet .NET.
Install-Package IronOcr.Languages.Tibetan
Exemple de code
Cet exemple de code C# lit du texte en alphabet tibétain à partir d'une image ou d'un document PDF.
// Import the IronOcr namespace to use its components
using IronOcr;
class Program
{
static void Main()
{
// Initialize a new IronTesseract object for OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan;
// Use a using statement for automatic resource disposal
using (var Input = new OcrInput(@"images\Tibetan.png"))
{
// Perform OCR to read text from the input image
var Result = Ocr.Read(Input);
// Retrieve all recognized text from the OCR Result
var AllText = Result.Text;
// Output the recognized text to the console
// Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace to use its components
using IronOcr;
class Program
{
static void Main()
{
// Initialize a new IronTesseract object for OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan;
// Use a using statement for automatic resource disposal
using (var Input = new OcrInput(@"images\Tibetan.png"))
{
// Perform OCR to read text from the input image
var Result = Ocr.Read(Input);
// Retrieve all recognized text from the OCR Result
var AllText = Result.Text;
// Output the recognized text to the console
// Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace to use its components
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize a new IronTesseract object for OCR
Dim Ocr = New IronTesseract()
' Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan
' Use a using statement for automatic resource disposal
Using Input = New OcrInput("images\Tibetan.png")
' Perform OCR to read text from the input image
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text from the OCR Result
Dim AllText = Result.Text
' Output the recognized text to the console
' Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText)
End Using
End Sub
End Class
Notes
- La bibliothèque OCR (
IronTesseract) est configurée pour lire la langue tibétaine à partir de l'image fournie. OcrInputgère le chargement de l'image d'entrée et assure la bonne élimination des ressources à l'aide de l'instructionusing.Result.Textcontient le texte traité par OCR qui peut être imprimé ou utilisé dans l'application.

