| value_tmpl | The value type. This is required to be an integer type. |
Public Types | |
| typedef value_tmpl | value_type |
| The type of a value. | |
Public Member Functions | |
| ngramdb_reader_base () | |
| Constructs an object. | |
| virtual | ~ngramdb_reader_base () |
| Destructs an object. | |
| bool | fail () const |
| Checks whether an error has occurred. | |
| std::string | error () const |
| Returns an error message. | |
| void | open (const std::string &name, int max_size) |
| Opens an n-gram database. | |
| void | close () |
| Closes an n-gram database. | |
| template<class measure_type, class query_type> | |
| void | overlapjoin (const query_type &query, double alpha, results_type &results) |
| Performs an overlap join on inverted lists retrieved for the query. | |
Protected Member Functions | |
| hashtbl_type & | open_index (const std::string &base, int size) |
| Open the index storing strings of the specific size. | |
| bool simstring::ngramdb_reader_base< value_tmpl >::fail | ( | ) | const [inline] |
Checks whether an error has occurred.
true if an error has occurred. | std::string simstring::ngramdb_reader_base< value_tmpl >::error | ( | ) | const [inline] |
Returns an error message.
| void simstring::ngramdb_reader_base< value_tmpl >::open | ( | const std::string & | name, | |
| int | max_size | |||
| ) | [inline] |
Opens an n-gram database.
| name | The name of the database. | |
| max_size | The maximum size of the strings. |
| void simstring::ngramdb_reader_base< value_tmpl >::overlapjoin | ( | const query_type & | query, | |
| double | alpha, | |||
| results_type & | results | |||
| ) | [inline] |
Performs an overlap join on inverted lists retrieved for the query.
| query | The query object that stores query n-grams, threshold, and conditions for the similarity measure. | |
| results | The SIDs that satisfies the overlap join. |
| hashtbl_type& simstring::ngramdb_reader_base< value_tmpl >::open_index | ( | const std::string & | base, | |
| int | size | |||
| ) | [inline, protected] |
Open the index storing strings of the specific size.
| base | The base name of the indices. | |
| size | The size of strings. |