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 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
virtual MeCab::Model::~Model |
( |
| ) |
[inline, virtual] |
Member Function Documentation
static Model* MeCab::Model::create |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| [static] |
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 |
static Model* MeCab::Model::create |
( |
const char * |
arg | ) |
[static] |
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. |
virtual Lattice* MeCab::Model::createLattice |
( |
| ) |
const [pure virtual] |
virtual Tagger* MeCab::Model::createTagger |
( |
| ) |
const [pure virtual] |
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
virtual const DictionaryInfo* MeCab::Model::dictionary_info |
( |
| ) |
const [pure virtual] |
Return DictionaryInfo linked list.
- Returns:
- DictionaryInfo linked list
virtual bool MeCab::Model::swap |
( |
Model * |
model | ) |
[pure virtual] |
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. |
static const char* MeCab::Model::version |
( |
| ) |
[static] |
Return a version string.
- Returns:
- version string
The documentation for this class was generated from the following file: