| 153 | // ---------------------------------------------------------------------------------------- |
| 154 | |
| 155 | void print_segment ( |
| 156 | const std::vector<std::string>& sentence, |
| 157 | const std::pair<unsigned long,unsigned long>& segment |
| 158 | ) |
| 159 | { |
| 160 | // Recall that a segment is a half open range starting with .first and ending just |
| 161 | // before .second. |
| 162 | for (unsigned long i = segment.first; i < segment.second; ++i) |
| 163 | cout << sentence[i] << " "; |
| 164 | cout << endl; |
| 165 | } |
| 166 | |
| 167 | // ---------------------------------------------------------------------------------------- |
| 168 | |