MCPcopy Index your code
hub / github.com/clips/pattern / case_sensitive

Function case_sensitive

pattern/vector/stemmer.py:284–294  ·  view source on GitHub ↗

Applies the letter case of the word to the stem: Ponies => Poni

(stem, word)

Source from the content-addressed store, hash-verified

282#--- STEMMER ---------------------------------------------------------------------------------------
283
284def 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
296def upper_consonant_y(w):
297 """ Sets the initial y, or y after a vowel, to Y.

Callers 1

stemFunction · 0.85

Calls 2

lenFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…