class_docstr: Provides a consistent `Transform` interface to tokenizers operating on `DataFrame`s and folders
class_docstr_tok: ["Provides","a","consistent","`","Transform","`","interface","to","tokenizers","operating","on","`","DataFrame","`","s","and","folders"]
code: def encodes(self, o: Path):
      if self.mode == "folder" and str(o).startswith(str(self.path)):
          tok = self.output_dir / o.relative_to(self.path)
          return L(tok.read_text(encoding="UTF-8").split(" "))
      else:
          return self._tokenize1(o.read_text())
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  import html
label_desc: Use image node_id 5 for calling the Tokenizer obj's underlying member method code with example usage: obj.encodes(o) and returns: L, self