#include <Word.h>
Inheritance diagram for Conjecture::Word:
*****************************************************************
A Word is separated from other Words within the Line by more horizontal space than between Glyphs within a Word.
The order in which Words are partitioned (before or after Glyphs are partitioned) depends on the algorithm, and use client-controlled. Note that accurate Word partitioning can improve Glyph identification in situations where the identification algorithm incorporates natural-language knowledge (spell checkers, etc.). However, it is expected that the Word class will be relatively unimportant except during output (to insert spaces), and thus not even strictly necssary (space insertion can be performed without requiring Word instances to be created).
Public Member Functions | |
Word (Element *parent, const Coord &topleft, const Coord &bottomright) | |
virtual Word * | asWord () |
virtual const Word * | asWord () const |
virtual void | printSummary (std::ostream &os=std::cerr, const std::string &indent="", int index=-1) const |
virtual void | writeText (std::ostream &os) const |
virtual int | type () const |
Static Public Member Functions | |
static void | test (int argc=0, const char *argv[]=NULL) |
|
Convert an Element to Word if it is a Word Reimplemented from Conjecture::Element. |
|
Print out information about this Element. Reimplemented from Conjecture::Element. |
|
Unit testing method. This static method should create instances of the class (and instances of any other class necessary) and perform tests to ensure that all methods within the class are working as expected. Reimplemented from Conjecture::Element. |
|
Returns an integer establishing how "small" this image type is, relative to other image types. It has nothing to do with width or height, but instead with the conceptual size of the type itself. All instances of a particular subtype will always return the same value. The code is designed so that Glyph returns a larger number than Word, which is larger than Line, which is larger than Region, which is larger than Page. This allows us to perform some sanity checks on hierarchial decompositions to ensure that we don't make silly structures in which Lines have Glyphs as parents, etc. FUTURE FIX: This method should be pure-virtual, but making it pure-virtual causes compilation failure (pure virtual method invoked in constructor). Reimplemented from Conjecture::Element. |
|
Writes a textual representation of this element to given output stream Reimplemented from Conjecture::Element. |