Class RecognitionResult

Class RecognitionResult

Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.1.0)

画像認識の結果です。
認識情報を含む要素と結果のエクスポート用メソッドが含まれています。

public class RecognitionResult

継承

objectRecognitionResult

継承されたメンバー

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

プロパティ

FileName

ファイルへのフルパス。

public string FileName { get; set; }

プロパティ値

string

Image

PDF作成用の画像を取得または設定します。

public byte[][,] Image { get; set; }

プロパティ値

byte[][,]

RecognitionAreasRectangles

矩形の座標を取得します。

public List<rectangle> RecognitionAreasRectangles { get; }

プロパティ値

List<rectangle>

RecognitionAreasText

領域(矩形)のリストの認識結果を取得します。

public List<string> RecognitionAreasText { get; }

プロパティ値

List<string&gt;

RecognitionCharactersList

認識アルゴリズムによって見つかった文字のセットで、確率の降順に並べられています。

public List<char[]> RecognitionCharactersList { get; }

プロパティ値

List<char[]&gt;

備考

最大確率と代替のシンボルの配列 System.Char。

RecognitionLinesResult

行(矩形)のリストを持つ認識結果のリストを取得します。

public List<recognitionresult.linesresult> RecognitionLinesResult { get; }

プロパティ値

List<RecognitionResult.LinesResult&gt;

RecognitionText

1つの文字列として認識結果を取得します。

public string RecognitionText { get; set; }

プロパティ値

string

Skew

歪み角度を取得します。

public float Skew { get; set; }

プロパティ値

float

Warnings

生成中に発生した非致命的な障害を説明する警告メッセージのリストを取得します。

public List<string> Warnings { get; }

プロパティ値

List<string&gt;

メソッド

GetJson(bool)

認識結果のJSON文字列を形成します。

public string GetJson(bool isReadable = false)

パラメータ

isReadable bool

JSONが人間に読みやすいかどうかを決定します。

戻り値

string

認識結果をJSON文字列として返します。

GetKeywords()

パスポートからキーワードを取得します(テストモード。アメリカ合衆国およびマダガスカルのパスポートのみで動作します)。

public Dictionary<string, recognitionresult.linesresult=""> GetKeywords()

戻り値

Dictionary<string, RecognitionResult.LinesResult&gt;

キーワードをキー、LinesResultを値とする辞書。

GetSpellCheckCorrectedText(SpellCheckLanguage, string)

テキストを修正します(誤字を置き換えます)。

public string GetSpellCheckCorrectedText(SpellCheckLanguage language = SpellCheckLanguage.Eng, string dictionaryPath = null)

パラメータ

language SpellCheckLanguage

使用する辞書。

dictionaryPath string

オプション。ユーザー辞書(頻度辞書)へのフルパス。
辞書ファイル形式:
UTF-8エンコーディングのプレーンテキストファイル。
単語と単語の頻度はスペースまたはタブで区切られています。デフォルトでは、単語は最初の列に、頻度は2番目の列にあることが期待されます。
各単語-頻度ペアは別々の行にあります。行は、文字のシーケンスの後に改行("\n")、キャリッジリターン("\r")、またはキャリッジリターンの後に改行が続くもの("\r\n")として定義されます。
各単語は小文字であることが期待されます。

戻り値

string

置き換えられた単語を含むテキスト。

GetSpellCheckErrorList(SpellCheckLanguage, string)

指定された入力テキストの誤字と提案された綴りを見つけます。

public List<spellcheckerror> GetSpellCheckErrorList(SpellCheckLanguage language = SpellCheckLanguage.Eng, string dictionaryPath = null)

パラメータ

language SpellCheckLanguage

使用する辞書。

dictionaryPath string

オプション。ユーザー辞書(頻度辞書)へのフルパス。
辞書ファイル形式:
UTF-8エンコーディングのプレーンテキストファイル。
単語と単語の頻度はスペースまたはタブで区切られています。デフォルトでは、単語は最初の列に、頻度は2番目の列にあることが期待されます。
各単語-頻度ペアは別々の行にあります。行は、文字のシーケンスの後に改行("\n")、キャリッジリターン("\r")、またはキャリッジリターンの後に改行が続くもの("\r\n")として定義されます。
各単語は小文字であることが期待されます。

戻り値

List<SpellCheckError&gt;

誤字を表すSpellCheckErrorオブジェクトのリストで、各誤字に対する提案された正しい綴りのリストと編集距離を含みます。

GetXml()

認識結果のXML文字列を形成します。

public string GetXml()

戻り値

string

認識結果をXMLシリアライズされた文字列として返します。

Save(string, SaveFormat, bool, SpellCheckLanguage, string, string, PdfOptimizationMode)

ドキュメントをプレーンテキスト、PDF、またはMicrosoft Wordドキュメントとして保存します。

public void Save(string fullFileName, SaveFormat saveFormat, bool applySpellingCorrection, SpellCheckLanguage language = SpellCheckLanguage.Eng, string dictionaryPath = null, string embeddedFontPath = null, PdfOptimizationMode optimizePdf = PdfOptimizationMode.MAXIMUM_QUALITY)

パラメータ

fullFileName string

選択した形式で認識結果を保存するためのパス付きファイル名。

saveFormat SaveFormat

ドキュメント形式(Docx、Txt、Pdf、Xlsx、Rtf、Json、Xml)。

applySpellingCorrection bool

認識結果に誤字がある場合、修正するためにtrueを設定します。

language SpellCheckLanguage

スペルチェックのための辞書(オプション)。

dictionaryPath string

オプション。ユーザー辞書のフルパス(.txt形式)。形式は[word - スペース - 頻度(数)]。
例:the 23135851162\nthat 3400031103\n

embeddedFontPath string

オプション。ユーザーフォントへのフルパス。

optimizePdf PdfOptimizationMode

背景画像の品質を低下させることによってPDFファイルのサイズを削減します。デフォルトでは、元の画像品質が保持されます。

Save(string, SaveFormat, string, PdfOptimizationMode)

ドキュメントをプレーンテキスト、PDF、またはMicrosoft Wordドキュメントとして保存します。

public void Save(string fullFileName, SaveFormat saveFormat, string embeddedFontPath = null, PdfOptimizationMode optimizePdf = PdfOptimizationMode.MAXIMUM_QUALITY)

パラメータ

fullFileName string

選択した形式で認識結果を保存するためのパス付きファイル名。

saveFormat SaveFormat

ドキュメント形式(Docx、Txt、Pdf、Xlsx、Rtf、Json、Xml)。

embeddedFontPath string

オプション。ユーザーフォントへのフルパス。

optimizePdf PdfOptimizationMode

背景画像の品質を低下させることによってPDFファイルのサイズを削減します。デフォルトでは、元の画像品質が保持されます。

Save(MemoryStream, SaveFormat, bool, SpellCheckLanguage, string, string, PdfOptimizationMode)

ドキュメントをプレーンテキスト、PDF、またはMicrosoft Wordドキュメントとして保存します。

public void Save(MemoryStream stream, SaveFormat saveFormat, bool applySpellingCorrection, SpellCheckLanguage language = SpellCheckLanguage.Eng, string dictionaryPath = null, string embeddedFontPath = null, PdfOptimizationMode optimizePdf = PdfOptimizationMode.MAXIMUM_QUALITY)

パラメータ

stream MemoryStream

選択した形式で認識結果を保存するためのMemoryStream。

saveFormat SaveFormat

ドキュメント形式(Docx、Txt、Pdf)。

applySpellingCorrection bool

認識結果に誤字がある場合、修正するためにtrueを設定します。

language SpellCheckLanguage

スペルチェックのための辞書(オプション)。

dictionaryPath string

オプション。ユーザー辞書のフルパス(.txt形式)。形式は[word - スペース - 頻度(数)]。
例:the 23135851162\nthat 3400031103\n

embeddedFontPath string

オプション。ユーザーフォントへのフルパス。

optimizePdf PdfOptimizationMode

背景画像の品質を低下させることによってPDFファイルのサイズを削減します。デフォルトでは、元の画像品質が保持されます。

Save(MemoryStream, SaveFormat, string, PdfOptimizationMode)

ドキュメントをプレーンテキスト、PDF、またはMicrosoft Wordドキュメントとして保存します。

public void Save(MemoryStream stream, SaveFormat saveFormat, string embeddedFontPath = null, PdfOptimizationMode optimizePdf = PdfOptimizationMode.MAXIMUM_QUALITY)

パラメータ

stream MemoryStream

選択した形式で認識結果を保存するためのMemoryStream。

saveFormat SaveFormat

ドキュメント形式(Docx、Txt、Pdf)。

embeddedFontPath string

オプション。ユーザーフォントへのフルパス。

optimizePdf PdfOptimizationMode

背景画像の品質を低下させることによってPDFファイルのサイズを削減します。デフォルトでは、元の画像品質が保持されます。

演算子

operator +(RecognitionResult, RecognitionResult)

認識されたフラグメント(行)から完全な結果を完成させます。

public static RecognitionResult operator +(RecognitionResult main, RecognitionResult part)

パラメータ

main RecognitionResult

右オペランドが追加されるオブジェクト。

part RecognitionResult

右オペランド。

戻り値

RecognitionResult

左オペランド。

 日本語