Norwegian 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 le norvégien.
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.Norvégien
Ce package contient 52 langues OCR for .NET :
- Norvégien
- NorwegianBest
- NorwegianFast
Télécharger
Pack de langue norvégienne [norvégien]
Installation
La première chose à faire est d'installer notre package OCR norvégien sur votre projet .NET.
Install-Package IronOcr.Languages.Norwegian
Exemple de code
Cet exemple de code C# lit du texte norvégien à partir d'une image ou d'un document PDF.
// Make sure to install the Norwegian language package:
// PM> Install-Package IronOcr.Languages.Norwegian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Norwegian
Ocr.Language = OcrLanguage.Norwegian;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\Norwegian.png"))
{
// Perform OCR to read the text from the image
var Result = Ocr.Read(Input);
// Store the extracted text in a variable
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
// Make sure to install the Norwegian language package:
// PM> Install-Package IronOcr.Languages.Norwegian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Norwegian
Ocr.Language = OcrLanguage.Norwegian;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\Norwegian.png"))
{
// Perform OCR to read the text from the image
var Result = Ocr.Read(Input);
// Store the extracted text in a variable
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
Imports IronOcr
' Make sure to install the Norwegian language package:
' PM> Install-Package IronOcr.Languages.Norwegian
Dim Ocr As New IronTesseract()
' Set the OCR language to Norwegian
Ocr.Language = OcrLanguage.Norwegian
' Define the input source as an image file
Using Input As New OcrInput("images\Norwegian.png")
' Perform OCR to read the text from the image
Dim Result = Ocr.Read(Input)
' Store the extracted text in a variable
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
Ce code initialise le moteur OCR, définit la langue sur le norvégien, lit le texte à partir d'une image, puis affiche le texte reconnu.
- Assurez-vous que le package IronOCR et le pack de langue norvégienne sont installés dans votre projet .NET pour que cet exemple fonctionne correctement.

