Applies the letter case of the word to the stem: Ponies => Poni
(stem, word)
| 282 | #--- STEMMER --------------------------------------------------------------------------------------- |
| 283 | |
| 284 | def case_sensitive(stem, word): |
| 285 | """ Applies the letter case of the word to the stem: |
| 286 | Ponies => Poni |
| 287 | """ |
| 288 | ch = [] |
| 289 | for i in xrange(len(stem)): |
| 290 | if word[i] == word[i].upper(): |
| 291 | ch.append(stem[i].upper()) |
| 292 | else: |
| 293 | ch.append(stem[i]) |
| 294 | return "".join(ch) |
| 295 | |
| 296 | def upper_consonant_y(w): |
| 297 | """ Sets the initial y, or y after a vowel, to Y. |