Commits

Matt Chaput  committed acf42a8

Fixed spelling error (posess -> possess). Fixes issue #165.

  • Participants
  • Parent commits b7df02c

Comments (0)

Files changed (2)

File src/whoosh/analysis.py

         self.between = re.compile(u("[^%s]+") % (self.delims,), re.UNICODE)
         # Expression for removing "'s" from the end of sub-words
         dispat = u("(?<=[%s%s])'[Ss](?=$|[%s])") % (lowercase, uppercase, self.delims)
-        self.posessive = re.compile(dispat, re.UNICODE)
+        self.possessive = re.compile(dispat, re.UNICODE)
         
         # Expression for finding case and letter-number transitions
         lower2upper = u("[%s][%s]") % (lowercase, uppercase)
         # num -> letter, etc.)
         splitting = self.splitting
         
-        # Make a list (dispos, for "disposessed") of (startchar, endchar) pairs
+        # Make a list (dispos, for "dispossessed") of (startchar, endchar) pairs
         # for runs of text between "'s"
         if "'" in string:
-            # Split on posessive 's
+            # Split on possessive 's
             dispos = []
             prev = 0
-            for match in self.posessive.finditer(string):
+            for match in self.possessive.finditer(string):
                 dispos.append((prev, match.start()))
                 prev = match.end()
             if prev < len(string):

File tests/test_analysis.py

     assert_equal(tokens, [("zo", 0, 2), ("wi", 3, 5), ("ki", 5, 7),
                           ("wo", 7, 9), ("rd", 10, 12), ("wikiword", 3, 12)])
 
-def test_intraword_posessive():
+def test_intraword_possessive():
     iwf = analysis.IntraWordFilter(mergewords=True, mergenums=True)
     ana = analysis.RegexTokenizer(r"\S+") | iwf | analysis.LowercaseFilter()