ZGen
0.2.0
a linearization system for natural language.
|
#include <alphabet.h>
Public Member Functions | |
InmutableAlphabet () | |
virtual const char * | decode (int id) const =0 |
virtual int | encode (const char *name) const =0 |
|
inline |
|
pure virtual |
Get the name of index from the alphabet.
[in] | id | The encoded index. |
Implemented in ZGen::Engine::ActionAlphabet, ZGen::Engine::PennTreebankDeprelAlphabet, and ZGen::Engine::PennTreebankPostagAlphabet.
|
pure virtual |
Get the index of the name from the alphabet.
[in] | name | The name string. |
Implemented in ZGen::Engine::ActionAlphabet, ZGen::Engine::PennTreebankDeprelAlphabet, and ZGen::Engine::PennTreebankPostagAlphabet.