KJB
|
#include <Semantic_db.h>
Public Member Functions | |
Semantic_db () | |
void | initialize_from_file (std::string file) |
read in semantic features from a file, mapping them to codes More... | |
const Key_type & | unknown_key () |
get the string associated with the special code for unknown value More... | |
Public Member Functions inherited from semantics::Token_map | |
Token_map () | |
construct an empty token map More... | |
virtual | ~Token_map () |
translate key into code More... | |
virtual Val_type | get_code (const Token_map::Key_type &key) |
look up code associated with key, or return UNKNOWN_TOKEN_VAL More... | |
virtual Val_type | encode (const Key_type &key, bool learn=false) |
look up code associated with key, adding it if not found More... | |
virtual const Key_type & | decode (const Val_type &val) |
look up key associated with code More... | |
virtual Val_type | next_val () |
gets the next unused code available (e.g., for UNKNOWN) More... | |
const_iterator | begin () |
const_iterator | end () |
Static Public Member Functions | |
static const Key_type & | null_key () |
get the string associated with the special code for "null" value More... | |
static const Key_type & | unknown_entity () |
Additional Inherited Members | |
Public Types inherited from semantics::Token_map | |
typedef std::string | Key_type |
typedef size_t | Val_type |
typedef boost::bimap< Key_type, Val_type > | Map |
typedef Map::value_type | Key_val_pair |
typedef Map::right_value_type | Val_key_pair |
typedef Map::const_iterator | const_iterator |
Static Public Attributes inherited from semantics::Token_map | |
static const Val_type | UNKNOWN_TOKEN_VAL = 1 |
Protected Attributes inherited from semantics::Token_map | |
Map | map_ |
Val_type | next_val_ |
semantics::Semantic_db::Semantic_db | ( | ) |
void semantics::Semantic_db::initialize_from_file | ( | std::string | file | ) |
read in semantic features from a file, mapping them to codes
|
static |
get the string associated with the special code for "null" value
|
static |
|
inlinevirtual |
get the string associated with the special code for unknown value
Implements semantics::Token_map.