Model class.
More...
#include <mecab.h>
|
static const char * | version () |
| Return a version string. More...
|
|
static Model * | create (int argc, char **argv) |
| Factory method to create a new Model with a specified main's argc/argv-style parameters. More...
|
|
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". More...
|
|
◆ ~Model()
virtual MeCab::Model::~Model |
( |
| ) |
|
|
inlinevirtual |
◆ create() [1/2]
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. |
◆ create() [2/2]
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 |
◆ createLattice()
virtual Lattice* MeCab::Model::createLattice |
( |
| ) |
const |
|
pure virtual |
◆ createTagger()
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
◆ dictionary_info()
Return DictionaryInfo linked list.
- Returns
- DictionaryInfo linked list
◆ lookup()
virtual Node* MeCab::Model::lookup |
( |
const char * |
begin, |
|
|
const char * |
end, |
|
|
Lattice * |
lattice |
|
) |
| const |
|
pure virtual |
perform common prefix search from the range [begin, end).
|lattice| takes the ownership of return value.
- Returns
- node linked list.
◆ swap()
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 explicitly before swapping model object.
- Returns
- boolean
- Parameters
-
model | new model which is going to be swapped with the current model. |
◆ transition_cost()
virtual int MeCab::Model::transition_cost |
( |
unsigned short |
rcAttr, |
|
|
unsigned short |
lcAttr |
|
) |
| const |
|
pure virtual |
Return transition cost from rcAttr to lcAttr.
- Returns
- transition cost
◆ version()
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:
- /home/runner/work/mecab/mecab/mecab/src/mecab.h