class_docstr: Lemmatizer for identifying roman numerals in Latin text based on
  regex.
  
  >>> lemmatizer = RomanNumeralLemmatizer()
  >>> lemmatizer.lemmatize("i ii iii iv v vi vii vii ix x xx xxx xl l lx c cc".split())
  [('i', 'NUM'), ('ii', 'NUM'), ('iii', 'NUM'), ('iv', 'NUM'), ('v', 'NUM'), ('vi', 'NUM'), ('vii', 'NUM'), ('vii', 'NUM'), ('ix', 'NUM'), ('x', 'NUM'), ('xx', 'NUM'), ('xxx', 'NUM'), ('xl', 'NUM'), ('l', 'NUM'), ('lx', 'NUM'), ('c', 'NUM'), ('cc', 'NUM')]
  
  >>> lemmatizer = RomanNumeralLemmatizer(default="RN")
  >>> lemmatizer.lemmatize('i ii iii'.split())
  [('i', 'RN'), ('ii', 'RN'), ('iii', 'RN')]
class_docstr_tok: ["Lemmatizer","for","identifying","roman","numerals","in","Latin","text","based","on","regex",".",">",">",">","lemmatizer","=","RomanNumeralLemmatizer","(",")",">",">",">","lemmatizer.lemmatize","(","``","i","ii","iii","iv","v","vi","vii","vii","ix","x","xx","xxx","xl","l","lx","c","cc","''",".split","(",")",")","[","(","'","i","'",",","'NUM","'",")",",","(","'ii","'",",","'NUM","'",")",",","(","'iii","'",",","'NUM","'",")",",","(","'iv","'",",","'NUM","'",")",",","(","'","v","'",",","'NUM","'",")",",","(","'vi","'",",","'NUM","'",")",",","(","'vii","'",",","'NUM","'",")",",","(","'vii","'",",","'NUM","'",")",",","(","'ix","'",",","'NUM","'",")",",","(","'","x","'",",","'NUM","'",")",",","(","'xx","'",",","'NUM","'",")",",","(","'xxx","'",",","'NUM","'",")",",","(","'xl","'",",","'NUM","'",")",",","(","'","l","'",",","'NUM","'",")",",","(","'lx","'",",","'NUM","'",")",",","(","'","c","'",",","'NUM","'",")",",","(","'cc","'",",","'NUM","'",")","]",">",">",">","lemmatizer","=","RomanNumeralLemmatizer","(","default=","''","RN","''",")",">",">",">","lemmatizer.lemmatize","(","'","i","ii","iii'.split","(",")",")","[","(","'","i","'",",","'RN","'",")",",","(","'ii","'",",","'RN","'",")",",","(","'iii","'",",","'RN","'",")","]"]
docstr: Use regular expressions for rules-based lemmatizing based on word endings;
  tokens are matched for patterns with the base kept as a group; an word ending
  replacement is added to the (base) group.
  :rtype: str
  :type tokens: list
  :param tokens: List of tokens to be lemmatized
  :type index: int
  :param index: Int with current token
  :type history: list
  :param history: List with tokens that have already been lemmatized; NOT USED
docstr_tok: ["Use","regular","expressions","for","rules-based","lemmatizing","based","on","word","endings",";","tokens","are","matched","for","patterns","with","the","base","kept","as","a","group",";","an","word","ending","replacement","is","added","to","the","(","base",")","group",".",":","rtype",":","str",":","type","tokens",":","list",":","param","tokens",":","List","of","tokens","to","be","lemmatized",":","type","index",":","int",":","param","index",":","Int","with","current","token",":","type","history",":","list",":","param","history",":","List","with","tokens","that","have","already","been","lemmatized",";","NOT","USED"]
code: def choose_tag(
      self, tokens: List[str], index: int, history: List[str]
  ):
      """Use regular expressions for rules-based lemmatizing based on word endings;
      tokens are matched for patterns with the base kept as a group; an word ending
      replacement is added to the (base) group.
      :rtype: str
      :type tokens: list
      :param tokens: List of tokens to be lemmatized
      :type index: int
      :param index: Int with current token
      :type history: list
      :param history: List with tokens that have already been lemmatized; NOT USED
      """
      for pattern, replace in self._regexs:
          if re.search(pattern, tokens[index]):
              if self.default:
                  return self.default
              else:
                  return replace
  
file_path: cltk/src/cltk/lemmatize/lat.py
imports: import os
  import re
  from typing import List
  from cltk.lemmatize.backoff import DefaultLemmatizer, DictLemmatizer, IdentityLemmatizer, RegexpLemmatizer, UnigramLemmatizer
  from cltk.utils import CLTK_DATA_DIR
  from cltk.utils.file_operations import open_pickle
label_desc: Use image node_id 2 for calling the RomanNumeralLemmatizer obj's underlying member method code with example usage: obj.choose_tag(tokens, index, history) and returns: self, replace