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

Function is_short

pattern/vector/stemmer.py:55–58  ·  view source on GitHub ↗

A word is called short if it consists of a short syllable preceded by zero or more consonants.

(w)

Source from the content-addressed store, hash-verified

53 return False
54
55def is_short(w):
56 """ A word is called short if it consists of a short syllable preceded by zero or more consonants.
57 """
58 return is_short_syllable(w[-3:]) and len([ch for ch in w[:-3] if ch in VOWELS]) == 0
59
60# A point made at least twice in the literature is that words beginning with gener-
61# are overstemmed by the Porter stemmer:

Callers 1

step_1bFunction · 0.85

Calls 2

is_short_syllableFunction · 0.85
lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…