#include <dbbi.h>
Class diagram for DictionaryBasedBreakIterator:
Public Members | |||
![]() | ![]() | virtual | ~DictionaryBasedBreakIterator () |
![]() | ![]() | Destructor. | |
![]() | ![]() | DictionaryBasedBreakIterator& | operator= (const DictionaryBasedBreakIterator& that) |
![]() | ![]() | Assignment operator. More... | |
![]() | ![]() | virtual BreakIterator* | clone (void) const |
![]() | ![]() | Returns a newly-constructed RuleBasedBreakIterator with the same behavior, and iterating over the same text, as this one. | |
![]() | ![]() | virtual int32_t | previous (void) |
![]() | ![]() | Advances the iterator backwards, to the last boundary preceding this one. More... | |
![]() | ![]() | virtual int32_t | following (int32_t offset) |
![]() | ![]() | Sets the iterator to refer to the first boundary position following the specified position. More... | |
![]() | ![]() | virtual int32_t | preceding (int32_t offset) |
![]() | ![]() | Sets the iterator to refer to the last boundary position before the specified position. More... | |
![]() | ![]() | virtual UClassID | getDynamicClassID (void) const |
![]() | ![]() | Returns a unique class ID POLYMORPHICALLY. More... | |
Static Public Members | |||
![]() | ![]() | UClassID | getStaticClassID (void) |
![]() | ![]() | Returns the class ID for this class. More... | |
Protected Members | |||
![]() | ![]() | virtual int32_t | handleNext (void) |
![]() | ![]() | This method is the actual implementation of the next() method. More... | |
![]() | ![]() | virtual void | reset (void) |
![]() | ![]() | dumps the cache of break positions (usually in response to a change in position of some sort). | |
Friends | |||
![]() | ![]() | class | DictionaryBasedBreakIteratorTables |
![]() | ![]() | class | BreakIterator |
This is necessary, for example, to handle word and line breaking in Thai, which doesn't use spaces between words. The state-table-based algorithm used by RuleBasedBreakIterator is used to divide up text as far as possible, and then contiguous ranges of letters are repeatedly compared against a list of known words (i.e., the dictionary) to divide them up into words.
DictionaryBasedBreakIterator uses the same rule language as RuleBasedBreakIterator, but adds one more special substitution name:
DictionaryBasedBreakIterator is also constructed with the filename of a dictionary file. It follows a prescribed search path to locate the dictionary (right now, it looks for it in /com/ibm/text/resources in each directory in the classpath, and won't find it in JAR files, but this location is likely to change). The dictionary file is in a serialized binary format. We have a very primitive (and slow) BuildDictionaryFile utility for creating dictionary files, but aren't currently making it public. Contact us for help.
NOTE The DictionaryBasedIterator class is still under development. The APIs are not in stable condition yet.
Definition at line 47 of file dbbi.h.
Destructor.
Assignment operator.
Sets this iterator to have the same behavior, and iterate over the same text, as the one passed in.
Returns a newly-constructed RuleBasedBreakIterator with the same behavior, and iterating over the same text, as this one.
Reimplemented from BreakIterator.
Advances the iterator backwards, to the last boundary preceding this one.
Reimplemented from BreakIterator.
Sets the iterator to refer to the first boundary position following the specified position.
@offset The position from which to begin searching for a break position.
Reimplemented from RuleBasedBreakIterator.
Sets the iterator to refer to the last boundary position before the specified position.
@offset The position to begin searching for a break from.
Reimplemented from RuleBasedBreakIterator.
Returns a unique class ID POLYMORPHICALLY.
Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.
Reimplemented from BreakIterator.
Returns the class ID for this class.
This is useful only for comparing to a return value from getDynamicClassID(). For example:
Base* polymorphic_pointer = createPolymorphicObject(); if (polymorphic_pointer->getDynamicClassID() == Derived::getStaticClassID()) ...
Reimplemented from RuleBasedBreakIterator.
This method is the actual implementation of the next() method.
All iteration vectors through here. This method initializes the state machine to state 1 and advances through the text character by character until we reach the end of the text or the state machine transitions to state 0. We update our return value every time the state machine passes through a possible end state.
Reimplemented from RuleBasedBreakIterator.
dumps the cache of break positions (usually in response to a change in position of some sort).
Reimplemented from RuleBasedBreakIterator.Member Function Documentation
virtual DictionaryBasedBreakIterator::~DictionaryBasedBreakIterator () [virtual]
DictionaryBasedBreakIterator & DictionaryBasedBreakIterator::operator= (const DictionaryBasedBreakIterator & that)
virtual BreakIterator * DictionaryBasedBreakIterator::clone (void) const [virtual]
virtual int32_t DictionaryBasedBreakIterator::previous (void) [virtual]
virtual int32_t DictionaryBasedBreakIterator::following (int32_t offset) [virtual]
virtual int32_t DictionaryBasedBreakIterator::preceding (int32_t offset) [virtual]
UClassID DictionaryBasedBreakIterator::getDynamicClassID (void) const [inline, virtual]
UClassID DictionaryBasedBreakIterator::getStaticClassID (void) [inline, static]
virtual int32_t DictionaryBasedBreakIterator::handleNext (void) [protected, virtual]
virtual void DictionaryBasedBreakIterator::reset (void) [protected, virtual]
Friends And Related Function Documentation
friend class DictionaryBasedBreakIteratorTables [friend]
friend class BreakIterator [friend]
The documentation for this class was generated from the following file:
Generated at Mon Jun 5 12:53:16 2000 for ICU1.5 by
1.0.0 written by Dimitri van Heesch,
© 1997-1999