Syriac OCR in C# and .NET
IronOCR은 .NET 개발자가 시리아어를 포함한 126개 언어로 된 이미지와 PDF 문서에서 텍스트를 읽을 수 있도록 해주는 C# 소프트웨어 구성 요소입니다.
이는 .NET 개발자 전용으로 개발된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.
IronOcr.Languages.Syriac의 내용
이 패키지에는 .NET 용 OCR 언어 108개가 포함되어 있습니다.
- 시리아어
- 시리아 베스트
- 시리아 패스트
- 시리아어 알파벳
- 시리아어 알파벳 베스트
- 시리아어알파벳패스트
다운로드
시리아어 학습 팩 [시리아어]
설치
첫 번째 단계는 .NET 프로젝트에 시리아어 OCR 패키지를 설치하는 것입니다.
Install-Package IronOcr.Languages.Syriac
코드 예제
이 C# 코드 예제는 이미지 또는 PDF 문서에서 시리아어 텍스트를 읽습니다.
// Import the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac;
// Create an OCR input from an image file
using (var Input = new OcrInput(@"images\Syriac.png"))
{
// Read the image and extract the text
var Result = Ocr.Read(Input);
// Retrieve the full recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac;
// Create an OCR input from an image file
using (var Input = new OcrInput(@"images\Syriac.png"))
{
// Read the image and extract the text
var Result = Ocr.Read(Input);
// Retrieve the full recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the language to Syriac
Ocr.Language = OcrLanguage.Syriac
' Create an OCR input from an image file
Using Input = New OcrInput("images\Syriac.png")
' Read the image and extract the text
Dim Result = Ocr.Read(Input)
' Retrieve the full recognized text
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
이 예시에서는 다음과 같습니다.
- 우리는 OCR을 처리하기 위해
IronTesseract의 인스턴스를 생성합니다. Ocr.Language가Syriac로 설정되어 이 언어에 대한 정확한 텍스트 인식을 보장합니다.- 우리는 시리아어 텍스트가 포함된 이미지를
OcrInput로 불러와Ocr.Read을 사용하여 처리합니다. - 인식된 텍스트는 애플리케이션에서 추가로 활용할 수 있도록
Result.Text에 저장됩니다.

