#include <PDict.hpp>
Public Methods | |
DictEntryVector () | |
DictEntryVector (char *buffer, DictEntryFilter *filter) | |
void | sortScores () |
sort the scores in descending order | |
bool | addEntry (DictEntry &entry, double(*compose)(double, double)=NULL) |
Add an entry, overwriting if it already exists. | |
bool | removeEntry (DictEntry &entry) |
Remove an entry. | |
char * | toBytes (int &numBytes) const |
Encode for binary writing. | |
void | toBytes (char *buffer) const |
Initialize from an array of bytes Encode for binary writing. | |
void | fromBytes (char *buffer, DictEntryFilter *filter) |
int | numEntries () const |
Number of active entries. May be <= size(). | |
void | normalize () |
Normalize probabilities of entries to sum to one. |
|
|
|
|
|
Add an entry, overwriting if it already exists.
|
|
|
|
Normalize probabilities of entries to sum to one.
|
|
Number of active entries. May be <= size().
|
|
Remove an entry.
|
|
sort the scores in descending order
|
|
Initialize from an array of bytes Encode for binary writing.
|
|
Encode for binary writing.
|