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
Remarks
Usage:
var ocr = new IronTesseract();
var input = new OcrInput();
input.LoadPdf("scanned.pdf");
var result = ocr.ReadDocumentAdvanced(input);
// Access all words with coordinates
foreach (var word in result.Words)
{
Console.WriteLine($"'{word.Text}' at ({word.X},{word.Y}) size ({word.Width}x{word.Height}) on page {word.PageNumber} conf={word.RegionConfidence:P0}");
}
// Sort words by reading order within a page
var page1Words = result.Words
.Where(w => w.PageNumber == 1)
.OrderBy(w => w.Y)
.ThenBy(w => w.X);
// Find low-confidence words that may indicate poor print quality
var lowQualityWords = result.Words.Where(w => w.RegionConfidence < 0.7);
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 |