class_docstr: Implementation of a lemmatizer based on a
  dictionary of lemmas and forms, backing off to regex rules.
  Since a given form may map to multiple lemmas,
  a corpus-based frequency disambiguator is employed.
  
  Subclasses must provide methods to load dictionary and corpora,
  and to specify regular expressions.
class_docstr_tok: ["Implementation","of","a","lemmatizer","based","on","a","dictionary","of","lemmas","and","forms",",","backing","off","to","regex","rules",".","Since","a","given","form","may","map","to","multiple","lemmas",",","a","corpus-based","frequency","disambiguator","is","employed",".","Subclasses","must","provide","methods","to","load","dictionary","and","corpora",",","and","to","specify","regular","expressions","."]
docstr: Looks for a match in the regex rules with the token.
  If found, applies the replacement part of the rule to the token and returns the result.
  Else just returns the token unchanged.
docstr_tok: ["Looks","for","a","match","in","the","regex","rules","with","the","token",".","If","found",",","applies","the","replacement","part","of","the","rule","to","the","token","and","returns","the","result",".","Else","just","returns","the","token","unchanged","."]
code: def _apply_regex(self, token):
      """Looks for a match in the regex rules with the token.
      If found, applies the replacement part of the rule to the token and returns the result.
      Else just returns the token unchanged.
      """
      for matches_rule, apply_rule in self.regex_rules:
          if matches_rule(token):
              return apply_rule(token)
      return token
  
file_path: cltk/src/cltk/lemmatize/naive_lemmatizer.py
imports: import math
  import os
  import re
  from abc import ABC, abstractmethod
  from typing import List, Tuple, Union
  from numpy import argmax
  from cltk.utils import CLTK_DATA_DIR
label_desc: Use image node_id 6 for calling the DictionaryRegexLemmatizer obj's underlying member method code with example usage: obj._apply_regex(token) and returns: token, apply_rule