tesseract  4.00.00dev
werd.h File Reference
#include "params.h"
#include "bits16.h"
#include "elst2.h"
#include "strngs.h"
#include "blckerr.h"
#include "stepblob.h"
#include "ocrrow.h"

Go to the source code of this file.

Classes

class  WERD
 

Enumerations

enum  WERD_FLAGS {
  W_SEGMENTED, W_ITALIC, W_BOLD, W_BOL,
  W_EOL, W_NORMALIZED, W_SCRIPT_HAS_XHEIGHT, W_SCRIPT_IS_LATIN,
  W_DONT_CHOP, W_REP_CHAR, W_FUZZY_SP, W_FUZZY_NON,
  W_INVERSE
}
 
enum  DISPLAY_FLAGS {
  DF_BOX, DF_TEXT, DF_POLYGONAL, DF_EDGE_STEP,
  DF_BN_POLYGONAL, DF_BLAMER
}
 

Functions

int word_comparator (const void *word1p, const void *word2p)
 

Enumeration Type Documentation

◆ DISPLAY_FLAGS

Enumerator
DF_BOX 
DF_TEXT 
DF_POLYGONAL 
DF_EDGE_STEP 
DF_BN_POLYGONAL 
DF_BLAMER 

Definition at line 47 of file werd.h.

48 {
49  /* Display flags bit number allocations */
50  DF_BOX, //< Bounding box
51  DF_TEXT, //< Correct ascii
52  DF_POLYGONAL, //< Polyg approx
53  DF_EDGE_STEP, //< Edge steps
54  DF_BN_POLYGONAL, //< BL normalisd polyapx
55  DF_BLAMER //< Blamer information
56 };
Definition: werd.h:55
Definition: werd.h:50
Definition: werd.h:51

◆ WERD_FLAGS

enum WERD_FLAGS
Enumerator
W_SEGMENTED 
W_ITALIC 
W_BOLD 
W_BOL 
W_EOL 
W_NORMALIZED 
W_SCRIPT_HAS_XHEIGHT 
W_SCRIPT_IS_LATIN 
W_DONT_CHOP 
W_REP_CHAR 
W_FUZZY_SP 
W_FUZZY_NON 
W_INVERSE 

Definition at line 30 of file werd.h.

31 {
32  W_SEGMENTED, //< correctly segmented
33  W_ITALIC, //< italic text
34  W_BOLD, //< bold text
35  W_BOL, //< start of line
36  W_EOL, //< end of line
37  W_NORMALIZED, //< flags
38  W_SCRIPT_HAS_XHEIGHT, //< x-height concept makes sense.
39  W_SCRIPT_IS_LATIN, //< Special case latin for y. splitting.
40  W_DONT_CHOP, //< fixed pitch chopped
41  W_REP_CHAR, //< repeated character
42  W_FUZZY_SP, //< fuzzy space
43  W_FUZZY_NON, //< fuzzy nonspace
44  W_INVERSE //< white on black
45 };
Definition: werd.h:44
Definition: werd.h:36
Definition: werd.h:33
Definition: werd.h:34
Definition: werd.h:35

Function Documentation

◆ word_comparator()

int word_comparator ( const void *  word1p,
const void *  word2p 
)

word_comparator()

word comparator used to sort a word list so that words are in increasing order of left edge.

Definition at line 394 of file werd.cpp.

394  {
395  WERD *word1 = *(WERD **)word1p;
396  WERD *word2 = *(WERD **)word2p;
397  return word1->bounding_box().left() - word2->bounding_box().left();
398 }
TBOX bounding_box() const
Definition: werd.cpp:160
inT16 left() const
Definition: rect.h:68
Definition: werd.h:60