| 155 | } |
| 156 | |
| 157 | std::string ResolveTextDictionaryPath(const std::string& dict_file_name) { |
| 158 | const std::string text_file_name = |
| 159 | ReplaceSuffix(dict_file_name, ".ocd2", ".txt"); |
| 160 | const std::string source_path = |
| 161 | std::string(PROJECT_SOURCE_DIR) + "/data/dictionary/" + text_file_name; |
| 162 | if (IsRegularFile(source_path)) { |
| 163 | return source_path; |
| 164 | } |
| 165 | |
| 166 | const std::string generated_path = |
| 167 | std::string(PROJECT_BINARY_DIR) + "/data/" + text_file_name; |
| 168 | if (IsRegularFile(generated_path)) { |
| 169 | return generated_path; |
| 170 | } |
| 171 | |
| 172 | throw FileNotFound(text_file_name); |
| 173 | } |
| 174 | |
| 175 | std::string ResolveSegmentationResourcePath( |
| 176 | const std::string& source_config_directory, const std::string& resource_path) { |
no test coverage detected