| 33 | } |
| 34 | |
| 35 | std::string read_text_file(const std::filesystem::path & path) { |
| 36 | std::ifstream input(path); |
| 37 | if (!input) { |
| 38 | throw std::runtime_error("failed to open batch text file: " + path.string()); |
| 39 | } |
| 40 | std::ostringstream raw; |
| 41 | raw << input.rdbuf(); |
| 42 | return raw.str(); |
| 43 | } |
| 44 | |
| 45 | std::string normalize_text_as_paragraph(const std::string & text) { |
| 46 | std::string normalized; |
no test coverage detected