DeepSpeech/native_client/trie_load.cc
2018-10-01 19:03:36 +02:00

23 lines
507 B
C++

#include <iostream>
#include <memory>
#include <string>
#include "alphabet.h"
#include "trie_node.h"
int main(int argc, char** argv)
{
const char* trie_path = argv[1];
const char* alphabet_path = argv[2];
printf("Loading trie(%s) and alphabet(%s)\n", trie_path, alphabet_path);
Alphabet alphabet_ = Alphabet(alphabet_path);
TrieNode *trieRoot_;
std::ifstream in(trie_path, std::ios::in | std::ios::binary);
TrieNode::ReadFromStream(in, trieRoot_, alphabet_.GetSize());
return 0;
}