From 1214533715a1acfbc35ebe29ff78afee2f850226 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sat, 26 Sep 2015 10:47:07 -0500 Subject: Work on DAWG generation. V1 DAWGs now include an alphabet. Begin creating DAWGs which extend other DAWGs. In general, laying the groundwork for plain text import to DAWG. --- lexiconparameters.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lexiconparameters.cpp') diff --git a/lexiconparameters.cpp b/lexiconparameters.cpp index 6761fc1..9da3b70 100644 --- a/lexiconparameters.cpp +++ b/lexiconparameters.cpp @@ -75,6 +75,14 @@ class Quackle::V1LexiconInterpreter : public LexiconInterpreter file.get(); // skip past version byte file.read(lexparams.m_hash, sizeof(lexparams.m_hash)); file.read((char*)bytes, 3); + + lexparams.m_utf8Alphabet.resize(file.get()); + for (size_t i = 0; i < lexparams.m_utf8Alphabet.size(); i++) + { + file >> lexparams.m_utf8Alphabet[i]; + file.get(); // separator space + } + file.get(); // whitespace separator lexparams.m_wordcount = (bytes[0] << 16) | (bytes[1] << 8) | bytes[2]; while (!file.eof()) { -- cgit v1.2.3