File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ static string LocateFile(const string& file_name) {
35
35
}
36
36
37
37
bool DictCompiler::Compile (const string &schema_file) {
38
- LOG (INFO) << " compiling: " ;
38
+ LOG (INFO) << " compiling dictionary for " << schema_file ;
39
39
bool build_table_from_source = true ;
40
40
DictSettings settings;
41
41
string dict_file = LocateFile (dict_name_ + " .dict.yaml" );
@@ -215,9 +215,13 @@ bool DictCompiler::BuildPrism(const string &schema_file,
215
215
// apply spelling algebra
216
216
Script script;
217
217
if (!schema_file.empty ()) {
218
+ Config config;
219
+ if (!config.LoadFromFile (schema_file)) {
220
+ LOG (ERROR) << " error loading prism definition from " << schema_file;
221
+ return false ;
222
+ }
218
223
Projection p;
219
- the<Config> config (Config::Require (" config" )->Create (schema_file));
220
- auto algebra = config->GetList (" speller/algebra" );
224
+ auto algebra = config.GetList (" speller/algebra" );
221
225
if (algebra && p.Load (algebra)) {
222
226
for (const auto & x : syllabary) {
223
227
script.AddSyllable (x);
You can’t perform that action at this time.
0 commit comments