Split string generation code into separate files
This commit is contained in:
1 parent
98bb75bd60
commit
0362ada640
11 files changed
+2087
-1981
No files matched your search
@@ -0,0 +1,33 @@
|
||||
|
||||
#ifndef DICTENCODER_H
|
||||
#define DICTENCODER_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
|
||||
// This class encapsulates the optional dictionary encoding of selected string lists
|
||||
class DictEncoder
|
||||
{
|
||||
public:
|
||||
|
||||
void addString(const std::string &inString, StringEncoded *outPtr);
|
||||
|
||||
void process(StringEntryList &outDictionary);
|
||||
|
||||
private:
|
||||
|
||||
bool optimizeSplit();
|
||||
bool optimizeJoin();
|
||||
void optimizeOrder();
|
||||
|
||||
void cleanupDictionary();
|
||||
|
||||
void extractWords(std::vector<std::string> &candidateList);
|
||||
int32_t evaluateCandidate(std::string &candidate);
|
||||
|
||||
std::vector<StringEncoded *> encodings;
|
||||
std::vector<std::string> dictionary;
|
||||
};
|
||||
|
||||
|
||||
#endif // DICTENCODER_H
|
||||
Reference in new issue
Block a user