X-Git-Url: https://git.korewanetadesu.com/?p=python-collate.git;a=blobdiff_plain;f=collate%2Fstrings.py;fp=collate%2Fstrings.py;h=16ba8be7328aabdbd1246936f32aafa1a6057c72;hp=487257ffe6e8a02dbdde8b9be669a25d1a976ba5;hb=308778ae560a3258a55d578b1dd52d030ce4399d;hpb=f854c6958fd98bc3a1709e7aa1ede1ce7f5ab612 diff --git a/collate/strings.py b/collate/strings.py index 487257f..16ba8be 100644 --- a/collate/strings.py +++ b/collate/strings.py @@ -40,6 +40,8 @@ ROMAN = { u"\u2188": 100000, } +INITIAL_STOPS = frozenset([u"a", u"an", u"the"]) + def stripends(word): """Strip punctuation and symbols from the ends of a string.""" while word and unicodedata.category(word[0])[0] in "PS":