Open Chinese Convert  1.0.3
A project for conversion between Traditional and Simplified Chinese
 All Classes Functions
Public Member Functions | Static Public Member Functions
opencc::DartsDict Class Reference

Darts dictionary. More...

#include <DartsDict.hpp>

Inheritance diagram for opencc::DartsDict:
opencc::Dict opencc::SerializableDict

List of all members.

Public Member Functions

virtual size_t KeyMaxLength () const
 Returns the length of the longest key in the dictionary.
virtual Optional< const
DictEntry * > 
Match (const char *word) const
 Matches a word exactly and returns the DictEntry or Optional::Null().
virtual Optional< const
DictEntry * > 
MatchPrefix (const char *word) const
 Matches the longest matched prefix of a word.
virtual LexiconPtr GetLexicon () const
 Returns all entries in the dictionary.
virtual void SerializeToFile (FILE *fp) const
 Serializes the dictionary and writes in to a file.

Static Public Member Functions

static DartsDictPtr NewFromDict (const Dict &thatDict)
 Constructs a DartsDict from another dictionary.
static DartsDictPtr NewFromFile (FILE *fp)

Detailed Description

Darts dictionary.


Member Function Documentation

Optional< const DictEntry * > DartsDict::MatchPrefix ( const char *  word) const [virtual]

Matches the longest matched prefix of a word.

For example given a dictionary having "a", "an", "b", "ba", "ban", "bana", the longest prefix of "banana" matched is "bana".

Reimplemented from opencc::Dict.


The documentation for this class was generated from the following files:
 All Classes Functions