Nicomsoft OCR: Developer's Guide


Blk_IsWordInDictionary


Syntax

C++:int Blk_IsWordInDictionary(HBLK BlkObj, int LineIndex, int WordIndex)
C#:int Blk_IsWordInDictionary(int BlkObj, int LineIndex, int WordIndex)
Visual Basic:Function Blk_IsWordInDictionary(ByVal BlkObj As Integer, ByVal LineIndex As Integer, ByVal WordIndex As Integer) As Integer
Java:int Blk_IsWordInDictionary(HBLK BlkObj, int LineIndex, int WordIndex)
Delphi:function Blk_IsWordInDictionary(BlkObj:HBLK; LineIndex:integer; WordIndex:integer):integer


Description

Checks if the word exists in the dictionary.


Parameters

BlkObj [IN] – the Block object. You can also specify the Image object if you want to work with the global list of text lines for the entire image.
LineIndex [IN] – the index of the text line; 0 – the first line.
WordIndex [IN] – the index of the word in the specified text line; 0 – the first word.


Return value

If success, returns 0 if the word was not found in dictionary, or 1 if the word was found; otherwise, returns an error code.


Remarks

The OCRSTEP_OCR step must be executed before calling this function.


Example

See the sample code for the Img_GetBlockCnt function.