Model class.
More...
#include <mecab.h>
List of all members.
Public Member Functions |
virtual const DictionaryInfo * | dictionary_info () const =0 |
| Return DictionaryInfo linked list.
|
virtual int | transition_cost (unsigned short rcAttr, unsigned short lcAttr) const =0 |
| Return transtion cost from rcAttr to lcAttr.
|
virtual Node * | lookup (const char *begin, const char *end, Lattice *lattice) const =0 |
| perform common prefix search from the range [begin, end).
|
virtual Tagger * | createTagger () const =0 |
| Create a new Tagger object.
|
virtual Lattice * | createLattice () const =0 |
| Create a new Lattice object.
|
virtual bool | swap (Model *model)=0 |
| Swap the instance with |model|.
|
virtual | ~Model () |
Static Public Member Functions |
static const char * | version () |
| Return a version string.
|
static Model * | create (int argc, char **argv) |
| Factory method to create a new Model with a specified main's argc/argv-style parameters.
|
static Model * | create (const char *arg) |
| Factory method to create a new Model with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen".
|
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
Factory method to create a new Model with a specified main's argc/argv-style parameters.
Return NULL if new model cannot be initialized. Use MeCab::getLastError() to obtain the cause of the errors.
- Returns:
- new Model object
- Parameters:
-
argc | number of parameters |
argv | parameter list |
Factory method to create a new Model with a string parameter representation, i.e., "-d /user/local/mecab/dic/ipadic -Ochasen".
Return NULL if new model cannot be initialized. Use MeCab::getLastError() to obtain the cause of the errors.
- Returns:
- new Model object
- Parameters:
-
arg | single string representation of the argment. |
Create a new Tagger object.
All returned tagger object shares this model object as a parsing model. Never delete this model object before deleting tagger object.
- Returns:
- new Tagger object
Return DictionaryInfo linked list.
- Returns:
- DictionaryInfo linked list
perform common prefix search from the range [begin, end).
|lattice| takes the ownership of return value.
- Returns:
- node linked list.
Swap the instance with |model|.
The ownership of |model| always moves to this instance, meaning that passed |model| will no longer be accessible after calling this method. return true if new model is swapped successfully. This method is thread safe. All taggers created by Model::createTagger() method will also be updated asynchronously. No need to stop the parsing thread excplicitly before swapping model object.
- Returns:
- boolean
- Parameters:
-
model | new model which is going to be swapped with the current model. |
Return transtion cost from rcAttr to lcAttr.
- Returns:
- transtion cost
Return a version string.
- Returns:
- version string
The documentation for this class was generated from the following file:
- /home/taku/proj/mecab/mecab/src/mecab.h