IronOCRを用いたC#での画像としてのテキストのハイライト
IronOCRのHighlightTextAndSaveAsImagesメソッドは検出されたテキストの周りにバウンディングボックスを描いてOCRの結果を可視化し、診断用の画像として保存します。これにより開発者はOCRの精度を確認し、認識の問題をデバッグすることができます。
OCR結果を視覚化するには、エンジンが画像内で検出した特定のテキスト要素の周囲にバウンディングボックスをレンダリングする必要があります。 このプロセスでは、個々の文字、単語、行、または段落の正確な位置に明確なハイライトを重ね、認識されたコンテンツの明確なマップを提供します。
この視覚的なフィードバックは、OCR出力精度のデバッグと検証に不可欠であり、ソフトウェアが何を識別し、どこでエラーを起こしたかを示します。 複雑な文書を扱うときや、認識に関する問題のトラブルシューティングを行うときには、視覚的なハイライトが不可欠な診断ツールとなります。
この記事はIronOCRのHighlightTextAndSaveAsImagesメソッドを用いた診断機能を示しています。 この機能は、テキストの特定の部分をハイライトし、確認のために画像として保存します。 文書処理システムの構築、品質管理対策の実施、OCR実装の検証のいずれにおいても、この機能は、OCRエンジンが検出した内容を即座に視覚的にフィードバックします。
このスニペットはIronOCRの使い方を示しています: PDFを読み込み、文書内の各単語をハイライトし、結果を画像として保存します。 たった1行で、OCR結果の視覚的なフィードバックが得られます。
-
1IronOCR を NuGet Package Manager でインストールします
-
2このコード スニペットをコピーして実行します。
new IronOcr.OcrInput().LoadPdf("document.pdf").HighlightTextAndSaveAsImages(new IronOcr.IronTesseract(), "highlight_page_", IronOcr.ResultHighlightType.Word);Dim ocrInput As New IronOcr.OcrInput() ocrInput.LoadPdf("document.pdf").HighlightTextAndSaveAsImages(New IronOcr.IronTesseract(), "highlight_page_", IronOcr.ResultHighlightType.Word)Dim ocrInput As New IronOcr.OcrInput() ocrInput.LoadPdf("document.pdf").HighlightTextAndSaveAsImages(New IronOcr.IronTesseract(), "highlight_page_", IronOcr.ResultHighlightType.Word) -
3実際の環境でテストするためにデプロイする
今日からご自身のプロジェクトでIronOCRを使い始めるには、無料トライアルをお試しください。
最小限のワークフロー(4ステップ)
- IronOCR C#ライブラリをダウンロードし、インストールします。
- OCRエンジンをインスタンス化する
LoadPdfでPDF文書を読み込むHighlightTextAndSaveAsImagesを使用してテキストセクションを強調し、画像として保存します
テキストをハイライトして画像として保存する方法
IronOCRでテキストをハイライトし、画像として保存することは簡単です。 既存のPDFをLoadPdfで読み込み、次にHighlightTextAndSaveAsImagesメソッドを呼び出してテキストのセクションを強調し、画像として保存します。 この技術では、OCRの精度を検証し、文書内のテキスト認識の問題をデバッグします。
このメソッドは3つのパラメーターを取ります:IronTesseract OCRエンジン、出力ファイル名のプレフィックス、およびハイライトするテキストの種類を決定するResultHighlightTypeからの列挙型です。 この例では、ResultHighlightType.Paragraphを使用して、テキストブロックを段落として強調表示します。HighlightTextAndSaveAsImages
この例では、3段落のPDFを使用しています。
入力されたPDFはどのように見えますか?
ハイライトコードをどのように実装しますか?
以下のサンプルコードはOcrInputクラスを使用した基本的な実装を示しています。
using IronOcr;
IronTesseract ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_page_", ResultHighlightType.Paragraph);using IronOcr;
IronTesseract ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_page_", ResultHighlightType.Paragraph);Imports IronOcr
Dim ocrTesseract As New IronTesseract()
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_page_", ResultHighlightType.Paragraph)
End UsingImports IronOcr
Dim ocrTesseract As New IronTesseract()
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_page_", ResultHighlightType.Paragraph)
End Using出力画像は何を示していますか?

上の出力画像に示すように、3つの段落はすべて薄い赤枠でハイライトされています。 この視覚的な表現により、開発者は、OCRエンジンが文書をどのように読みやすいブロックに分割しているかをすばやく識別することができます。
異なるResultHighlightTypeオプションは何ですか?
上記の例では、ResultHighlightType.Paragraphを使用してテキストブロックをハイライトしました。 IronOCR はこの列挙型を通じて追加の強調表示オプションを提供します。 以下は、利用可能なタイプの完全なリストで、それぞれ診断の目的が異なります。
**文字: **OCRエンジンで検出された各文字の周りにバウンディングボックスを描きます。文字認識や特化したフォントをデバッグするのに役立ちます。カスタム言語ファイルを使用する際に特に便利です。
**単語: **エンジンで識別された各単語をハイライトします。単語の境界や適切な単語の識別を確認するのに最適です。特にバーコードやQRコードの読み取りとテキスト認識を組み合わせる際に便利です。
**行: **検出された各テキスト行をハイライトします。複雑なレイアウトを持つドキュメントの行の識別を確認するのに便利です。スキャンされたドキュメントの処理時などに役立ちます。
**段落: **段落としてグループ化されたテキストブロック全体をハイライトします。ドキュメントのレイアウトを理解し、テキストブロックの分割を確認するのに最適です。テーブル抽出を行う際に特に便利です。
異なるハイライトタイプをどのように比較しますか?
この包括的な例では、同じドキュメント上ですべての異なるタイプのハイライトを生成することを実演しており、結果を比較することができます:
using IronOcr;
using System;
// Initialize the OCR engine with custom configuration
IronTesseract ocrTesseract = new IronTesseract();
// Configure for better accuracy if needed
ocrTesseract.Configuration.ReadBarCodes = false; // Disable if not needed for performance
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Load the PDF document
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
// Generate highlights for each type
Console.WriteLine("Generating character-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_character_", ResultHighlightType.Character);
Console.WriteLine("Generating word-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_word_", ResultHighlightType.Word);
Console.WriteLine("Generating line-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_line_", ResultHighlightType.Line);
Console.WriteLine("Generating paragraph-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_paragraph_", ResultHighlightType.Paragraph);
Console.WriteLine("All highlight images have been generated successfully!");using IronOcr;
using System;
// Initialize the OCR engine with custom configuration
IronTesseract ocrTesseract = new IronTesseract();
// Configure for better accuracy if needed
ocrTesseract.Configuration.ReadBarCodes = false; // Disable if not needed for performance
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Load the PDF document
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
// Generate highlights for each type
Console.WriteLine("Generating character-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_character_", ResultHighlightType.Character);
Console.WriteLine("Generating word-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_word_", ResultHighlightType.Word);
Console.WriteLine("Generating line-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_line_", ResultHighlightType.Line);
Console.WriteLine("Generating paragraph-level highlights...");
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_paragraph_", ResultHighlightType.Paragraph);
Console.WriteLine("All highlight images have been generated successfully!");Imports IronOcr
Imports System
' Initialize the OCR engine with custom configuration
Dim ocrTesseract As New IronTesseract()
' Configure for better accuracy if needed
ocrTesseract.Configuration.ReadBarCodes = False ' Disable if not needed for performance
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Load the PDF document
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
' Generate highlights for each type
Console.WriteLine("Generating character-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_character_", ResultHighlightType.Character)
Console.WriteLine("Generating word-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_word_", ResultHighlightType.Word)
Console.WriteLine("Generating line-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_line_", ResultHighlightType.Line)
Console.WriteLine("Generating paragraph-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_paragraph_", ResultHighlightType.Paragraph)
End Using
Console.WriteLine("All highlight images have been generated successfully!")Imports IronOcr
Imports System
' Initialize the OCR engine with custom configuration
Dim ocrTesseract As New IronTesseract()
' Configure for better accuracy if needed
ocrTesseract.Configuration.ReadBarCodes = False ' Disable if not needed for performance
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Load the PDF document
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
' Generate highlights for each type
Console.WriteLine("Generating character-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_character_", ResultHighlightType.Character)
Console.WriteLine("Generating word-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_word_", ResultHighlightType.Word)
Console.WriteLine("Generating line-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_line_", ResultHighlightType.Line)
Console.WriteLine("Generating paragraph-level highlights...")
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_paragraph_", ResultHighlightType.Paragraph)
End Using
Console.WriteLine("All highlight images have been generated successfully!")複数ページのドキュメントをどのように処理しますか?
マルチページのPDFやマルチフレームTIFFファイルを処理する際、ハイライト機能は各ページを自動的に個別に処理します。 これは、PDF OCRテキスト抽出のワークフローを実装する際に特に便利です:
using IronOcr;
using System.IO;
IronTesseract ocrTesseract = new IronTesseract();
// Load a multi-page document
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("multi-page-document.pdf");
// Create output directory if it doesn't exist
string outputDir = "highlighted_pages";
Directory.CreateDirectory(outputDir);
// Generate highlights for each page
// Files will be named: highlighted_pages/page_0.png, page_1.png, etc.
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract,
Path.Combine(outputDir, "page_"),
ResultHighlightType.Word);
// Count generated files for verification
int pageCount = Directory.GetFiles(outputDir, "page_*.png").Length;
Console.WriteLine($"Generated {pageCount} highlighted page images");using IronOcr;
using System.IO;
IronTesseract ocrTesseract = new IronTesseract();
// Load a multi-page document
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("multi-page-document.pdf");
// Create output directory if it doesn't exist
string outputDir = "highlighted_pages";
Directory.CreateDirectory(outputDir);
// Generate highlights for each page
// Files will be named: highlighted_pages/page_0.png, page_1.png, etc.
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract,
Path.Combine(outputDir, "page_"),
ResultHighlightType.Word);
// Count generated files for verification
int pageCount = Directory.GetFiles(outputDir, "page_*.png").Length;
Console.WriteLine($"Generated {pageCount} highlighted page images");Imports IronOcr
Imports System.IO
Dim ocrTesseract As New IronTesseract()
' Load a multi-page document
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("multi-page-document.pdf")
' Create output directory if it doesn't exist
Dim outputDir As String = "highlighted_pages"
Directory.CreateDirectory(outputDir)
' Generate highlights for each page
' Files will be named: highlighted_pages/page_0.png, page_1.png, etc.
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract,
Path.Combine(outputDir, "page_"),
ResultHighlightType.Word)
' Count generated files for verification
Dim pageCount As Integer = Directory.GetFiles(outputDir, "page_*.png").Length
Console.WriteLine($"Generated {pageCount} highlighted page images")
End UsingImports IronOcr
Imports System.IO
Dim ocrTesseract As New IronTesseract()
' Load a multi-page document
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("multi-page-document.pdf")
' Create output directory if it doesn't exist
Dim outputDir As String = "highlighted_pages"
Directory.CreateDirectory(outputDir)
' Generate highlights for each page
' Files will be named: highlighted_pages/page_0.png, page_1.png, etc.
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract,
Path.Combine(outputDir, "page_"),
ResultHighlightType.Word)
' Count generated files for verification
Dim pageCount As Integer = Directory.GetFiles(outputDir, "page_*.png").Length
Console.WriteLine($"Generated {pageCount} highlighted page images")
End Usingパフォーマンスのベストプラクティスは何ですか?
ハイライト機能を使用する場合は、以下のベストプラクティスを考慮してください:
- **ファイルサイズ: **ハイライトされた画像は大きくなることがあり、高解像度のドキュメントでは特にそうです。 大きなバッチを処理する場合は、出力ディレクトリの空き容量を考慮してください。 最適化のヒントについては、当社の高速OCR設定ガイドを参照してください。
- **パフォーマンス: **ハイライトの生成は処理のオーバーヘッドを追加します。 ハイライトがたまにしか必要とされない本番システムでは、メインのワークフローの一部ではなく、別の診断プロセスとして実装してください。 バッチ処理には、マルチスレッドOCRの使用を検討してください。
- **エラーハンドリング: **ファイル操作を行う際には適切なエラーハンドリングを常に実装してください。
try
{
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
// Apply image filters if needed for better recognition
ocrInput.Deskew(); // Correct slight rotations
ocrInput.DeNoise(); // Remove background noise
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_", ResultHighlightType.Word);
}
catch (Exception ex)
{
Console.WriteLine($"Error during highlighting: {ex.Message}");
// Log error details for debugging
}try
{
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("document.pdf");
// Apply image filters if needed for better recognition
ocrInput.Deskew(); // Correct slight rotations
ocrInput.DeNoise(); // Remove background noise
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_", ResultHighlightType.Word);
}
catch (Exception ex)
{
Console.WriteLine($"Error during highlighting: {ex.Message}");
// Log error details for debugging
}Imports System
Try
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
' Apply image filters if needed for better recognition
ocrInput.Deskew() ' Correct slight rotations
ocrInput.DeNoise() ' Remove background noise
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_", ResultHighlightType.Word)
End Using
Catch ex As Exception
Console.WriteLine($"Error during highlighting: {ex.Message}")
' Log error details for debugging
End TryImports System
Try
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("document.pdf")
' Apply image filters if needed for better recognition
ocrInput.Deskew() ' Correct slight rotations
ocrInput.DeNoise() ' Remove background noise
ocrInput.HighlightTextAndSaveAsImages(ocrTesseract, "highlight_", ResultHighlightType.Word)
End Using
Catch ex As Exception
Console.WriteLine($"Error during highlighting: {ex.Message}")
' Log error details for debugging
End TryハイライトはOCR結果とどのように統合しますか?
ハイライト機能はIronOCRの結果オブジェクトと連携し、視覚的なハイライトを抽出したテキストデータと関連付けることができます。 特定の認識されたテキストのセクションをtrack OCR progressまたは検証する必要がある場合に特に便利です。 OcrResultクラスは、検出された各要素に関する詳細情報を提供し、このメソッドによって生成された視覚的ハイライトに直接対応します。
問題に遭遇した場合はどうすればよいですか?
ハイライト機能に問題がある場合は、一般的な解決策について一般的なトラブルシューティングガイドを参照してください。 特定のハイライトに関する問題
- **空白の出力画像: **入力ドキュメントに読み取り可能なテキストが含まれていることを確認し、OCRエンジンがドキュメントのタイプに適切に設定されていることを確認してください。 画像最適化フィルターや
fixing image orientationを適用して認識を向上させる必要があるかもしれません。 - **ハイライトの欠落: **一部のドキュメントタイプは特定の前処理を必要とすることがあります。 画像フィルターや
fixing image orientationを適用して認識を向上させてみてください。 - **パフォーマンスの問題: **大きなドキュメントに対しては、処理速度を改善するために
multithreadingを実装することを考慮してください。 また、低品質の入力を扱う場合は、低品質スキャンを修正するためのガイドを確認してください。
これをどのように製品のデバッグに使用できますか?
ハイライト機能は、優れた生産デバッグツールとして機能します。 長時間実行される操作に対して中止トークンやタイムアウトと統合すると、信頼性の高い診断システムを構築できます。 アプリケーションにデバッグモードを実装することを検討してください:
public class OcrDebugger
{
private readonly IronTesseract _tesseract;
private readonly bool _debugMode;
public OcrDebugger(bool enableDebugMode = false)
{
_tesseract = new IronTesseract();
_debugMode = enableDebugMode;
}
public OcrResult ProcessDocument(string filePath)
{
using var input = new OcrInput();
input.LoadPdf(filePath);
// Apply preprocessing
input.Deskew();
input.DeNoise();
// Generate debug highlights if in debug mode
if (_debugMode)
{
string debugPath = $"debug_{Path.GetFileNameWithoutExtension(filePath)}_";
input.HighlightTextAndSaveAsImages(_tesseract, debugPath, ResultHighlightType.Word);
}
// Perform actual OCR
return _tesseract.Read(input);
}
}public class OcrDebugger
{
private readonly IronTesseract _tesseract;
private readonly bool _debugMode;
public OcrDebugger(bool enableDebugMode = false)
{
_tesseract = new IronTesseract();
_debugMode = enableDebugMode;
}
public OcrResult ProcessDocument(string filePath)
{
using var input = new OcrInput();
input.LoadPdf(filePath);
// Apply preprocessing
input.Deskew();
input.DeNoise();
// Generate debug highlights if in debug mode
if (_debugMode)
{
string debugPath = $"debug_{Path.GetFileNameWithoutExtension(filePath)}_";
input.HighlightTextAndSaveAsImages(_tesseract, debugPath, ResultHighlightType.Word);
}
// Perform actual OCR
return _tesseract.Read(input);
}
}Public Class OcrDebugger
Private ReadOnly _tesseract As IronTesseract
Private ReadOnly _debugMode As Boolean
Public Sub New(Optional enableDebugMode As Boolean = False)
_tesseract = New IronTesseract()
_debugMode = enableDebugMode
End Sub
Public Function ProcessDocument(filePath As String) As OcrResult
Using input As New OcrInput()
input.LoadPdf(filePath)
' Apply preprocessing
input.Deskew()
input.DeNoise()
' Generate debug highlights if in debug mode
If _debugMode Then
Dim debugPath As String = $"debug_{Path.GetFileNameWithoutExtension(filePath)}_"
input.HighlightTextAndSaveAsImages(_tesseract, debugPath, ResultHighlightType.Word)
End If
' Perform actual OCR
Return _tesseract.Read(input)
End Using
End Function
End ClassPublic Class OcrDebugger
Private ReadOnly _tesseract As IronTesseract
Private ReadOnly _debugMode As Boolean
Public Sub New(Optional enableDebugMode As Boolean = False)
_tesseract = New IronTesseract()
_debugMode = enableDebugMode
End Sub
Public Function ProcessDocument(filePath As String) As OcrResult
Using input As New OcrInput()
input.LoadPdf(filePath)
' Apply preprocessing
input.Deskew()
input.DeNoise()
' Generate debug highlights if in debug mode
If _debugMode Then
Dim debugPath As String = $"debug_{Path.GetFileNameWithoutExtension(filePath)}_"
input.HighlightTextAndSaveAsImages(_tesseract, debugPath, ResultHighlightType.Word)
End If
' Perform actual OCR
Return _tesseract.Read(input)
End Using
End Function
End Class次にどこに進めばよいですか?
ハイライト機能の使い方は理解できたと思います:
- あるいは、OCRの結果から検索可能なPDFを作成する
- パスポートやライセンスのような特定のドキュメントタイプを読み取る
- 当社の入門ガイドを使って開発環境にIronOCRをセットアップします
- グローバルアプリケーションのための125の国際言語サポートの実装
- フィルタウィザードを使って画像処理を最適化する
本番使用時は、ウォーターマークを除去し、完全な機能にアクセスするためにライセンスを取得することを忘れないでください。
よくある質問
IronOCRはどのようにして画像内のテキストをハイライトしますか?
IronOCRはHighlightTextAndSaveAsImagesメソッドを使用してOCR結果を視覚化します。検出された文字、単語、行、段落などのテキストの周囲にバウンディングボックスを描画し、それらを画像として保存します。
OCRでテキストのハイライトはなぜ有用ですか?
テキストのハイライトは、OCR出力の精度をデバッグおよび検証するのに役立ちます。これにより、OCRエンジンが検出したものへの視覚的なフィードバックが提供され、複雑なドキュメントでの認識エラーを特定するのに役立ちます。
IronOCRを使用してPDFドキュメントのテキストハイライトをどのように実装できますか?
LoadPdfでPDFドキュメントを読み込み、IronOCRのHighlightTextAndSaveAsImagesメソッドを使用できます。これにより、指定されたテキスト要素をハイライトし、結果を画像として保存します。
IronOCRの異なるResultHighlightTypeオプションは何ですか?
IronOCRは、Character、Word、Line、Paragraphなどの異なるResultHighlightTypeオプションを提供しており、それぞれがテキスト認識の診断目的に役立ちます。
IronOCRはテキストハイライトのために複数ページのドキュメントを処理できますか?
はい、IronOCRはPDFやTIFFファイルのような複数ページのドキュメントを処理でき、各ページを自動的に個別に処理し、対応するハイライトされた画像を生成します。
本番環境でハイライト機能を使用する際に考慮すべきことは何ですか?
ハイライト機能を使用する際、ファイルサイズと処理オーバーヘッドを考慮してください。即時のフィードバックが必要でない場合は、ハイライトを別の診断プロセスとして実装するのが最適です。
IronOCRで空白の出力画像の問題にどのように対処できますか?
入力ドキュメントが読み取り可能なテキストを含んでいること、OCRエンジンが正しく設定されていることを確認してください。また、結果を改善するために画像の最適化や向きの調整が必要な場合があります。
IronOCRのハイライトを使用する際のパフォーマンスのベストプラクティスは何ですか?
大きなハイライト画像を管理するために十分なスペースを確保し、速度向上のためにマルチスレッド化を検討してください。ファイル操作のための適切なエラー処理も行うべきです。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。