Class AdvancedWord
Represents a single word recognized by the advanced OCR engine, including its text and spatial coordinates.
This class provides word-level granularity for OcrDocAdvancedResult, enabling customers to determine reading order, reconstruct text layout, and map words to their positions in the original document.
Inherited Members
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public class AdvancedWord : AdvancedOcrElement
Word-level results from an advanced OCR read are carried by AdvancedWord. Each instance is one word the engine recognized, paired with the pixel rectangle that places it on the page, so a project can lay text back over an image, draw word boxes, or search by location. It is the word-granularity counterpart of AdvancedCharacter, which exposes the same data one glyph at a time.
You obtain an AdvancedWord from the Words array on an AdvancedOcrResultBase, the result returned by the advanced and handwriting reads on IronTesseract. Iterating that array walks every word found across the document in reading order.
The recognized text is on Text, and the geometry comes from members inherited from AdvancedOcrElement: BoundingBox gives the pixel rectangle, X, Y, Width, and Height give the same box as separate values, and PageNumber reports the 1-based page. RegionIndex and RegionConfidence connect the word to its text region and that region's confidence, which helps when discarding uncertain words before further processing.
foreach (AdvancedWord word in result.Words)
Console.WriteLine($"{word.Text} ({word.Width}x{word.Height})");The read document advanced how-to covers an advanced read end to end, and the read results how-to demonstrates traversing words and their coordinates.
Methods
ToString()
Returns a string representation of this word including its text, location, and confidence.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |