class_docstr: Implements the Paice-Husk stemming algorithm.
      
code: def read_rules(self, ruletable):
      rule_expr = self.rule_expr
      rules = self.rules
  
      for line in ruletable.split("\n"):
          line = line.strip()
          if not line:
              continue
  
          match = rule_expr.match(line)
          if match:
              ending = match.group("ending")[::-1]
              lastchar = ending[-1]
              intact = match.group("intact") == "*"
              num = int(match.group("num"))
              append = match.group("append")
              cont = match.group("cont") == ">"
  
              rules[lastchar].append(
                  (ending, intact, num, append, cont)
              )
          else:
              raise Exception("Bad rule: %r" % line)
  
file_path: whoosh/src/whoosh/lang/paicehusk.py
imports: import re
  from collections import defaultdict
label_desc: Use image node_id 2 for calling the PaiceHuskStemmer obj's underlying member method code with example usage: obj.read_rules(ruletable) without return types