Class OcrResult.Paragraph
Represents a paragraph of text with an OcrResult object.
Inheritance
Implements
Inherited Members
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public class Paragraph : OcrResult.OcrResultTextElement
OcrResult.Paragraph is one recognized paragraph of text, the layout level between a block and the individual lines. It groups the lines, words, and characters that belong together so you can read or process a document by paragraph instead of stitching loose words back into prose.
You receive paragraphs from a page: OcrResult.Page.Paragraphs returns an array of Paragraph in reading order. Each paragraph derives from OcrResult.OcrResultTextElement, so it also exposes the shared Text, Confidence, and BoundingBox members for the whole paragraph.
The members let you drill in or step out. Lines, Words, and Characters are arrays of the finer elements within the paragraph, each in reading order, so you can walk down from a paragraph to its words without re-querying the page. Block points back up to the OcrResult.Block that contains this paragraph, and ParagraphNumber is a 1 based identifier within the document. Read Text from the base for the joined-up paragraph string, then use these members when you need its structure.
The OCR results objects example walks the paragraph hierarchy, and the reading results how-to shows how to pull structured text from a page.
Fields
Block
Represents the Block of text that contains this paragraph.
Declaration
public OcrResult.Block Block
Field Value
| Type | Description |
|---|---|
| OcrResult.Block |
Properties
Characters
Represents every character in this paragraph, in order of appearance.
Declaration
public OcrResult.Character[] Characters { get; }
Property Value
| Type | Description |
|---|---|
| OcrResult.Character[] |
Lines
Represents every line of text in this paragraph.
Declaration
public OcrResult.Line[] Lines { get; }
Property Value
| Type | Description |
|---|---|
| OcrResult.Line[] |
ParagraphNumber
1 based unique numerical identifier for this paragraph within the OcrResult document.
Declaration
public int ParagraphNumber { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Words
Represents every word in this paragraph, in order of appearance.
Declaration
public OcrResult.Word[] Words { get; }
Property Value
| Type | Description |
|---|---|
| OcrResult.Word[] |