Hangul 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, dont l'alphabet Hangul.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.Hangul
Ce package contient 156 langues OCR for .NET :
- Alphabet Hangul
- Alphabet HangulBest
- Alphabet HangulFast
- HangulVerticalAlphabet
- HangulVerticalAlphabetBest
- HangulVerticalAlphabetFast
Télécharger
Pack de langue Hangul Alphabet [Alphabet coréen]
Installation
La première étape consiste à installer le package OCR de l'alphabet Hangul dans votre projet .NET.
Exemple de code
Cet exemple de code C# lit du texte en alphabet hangul à partir d'une image ou d'un document PDF.
// Ensure the IronOCR library is installed
// PM> Install-Package IronOcr.Languages.Hangul
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for performing OCR
var Ocr = new IronTesseract();
// Specify the Hangul language pack for better accuracy with Korean texts
Ocr.Language = OcrLanguage.Hangul;
// Load the image or PDF you want to read
using (var Input = new OcrInput(@"images\Hangul.png"))
{
// Perform OCR to read the text from the image
var Result = Ocr.Read(Input);
// Extract the recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}' Ensure the IronOCR library is installed
' PM> Install-Package IronOcr.Languages.Hangul
Imports IronOcr
Module Program
Sub Main()
' Create a new instance of IronTesseract for performing OCR
Dim Ocr As New IronTesseract()
' Specify the Hangul language pack for better accuracy with Korean texts
Ocr.Language = OcrLanguage.Hangul
' Load the image or PDF you want to read
Using Input As New OcrInput("images\Hangul.png")
' Perform OCR to read the text from the image
Dim Result = Ocr.Read(Input)
' Extract the recognized text
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End ModuleExplication :
- IronTesseract : Il s'agit de la classe principale utilisée pour effectuer les opérations OCR.
- OcrLanguage.Hangul : Ceci spécifie que le moteur OCR doit utiliser le pack de langue Hangul, ce qui optimise le moteur pour la reconnaissance de texte coréen.
- OcrInput : Il s'agit d'un conteneur pour les images ou les PDF à traiter.
Ocr.Read(): Cette méthode effectue l'opération OCR et renvoie un objet résultat contenant le texte reconnu.

Curtis Chau détient un baccalauréat en informatique (Université de Carleton) et se spécialise dans le développement front-end avec expertise en Node.js, TypeScript, JavaScript et React. Passionné par la création d'interfaces utilisateur intuitives et esthétiquement plaisantes, Curtis aime travailler avec des frameworks modernes et créer des manuels bien structurés et visuellement attrayants.