class_docstr: A wrapper around `tok` which applies `rules`, then tokenizes, then applies `post_rules`
class_docstr_tok: ["A","wrapper","around","`","tok","`","which","applies","`","rules","`",",","then","tokenizes",",","then","applies","`","post_rules","`"]
code: def __init__(self, tok, rules=None, post_rules=None):
      self.rules = L(ifnone(rules, defaults.text_proc_rules))
      self.post_f = compose(
          *L(ifnone(post_rules, defaults.text_postproc_rules))
      )
      self.tok = tok
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  import html
label_desc: Use image node_id 1 to create a new TokenizeWithRules object  with example: obj = TokenizeWithRules(tok, rules, post_rules)