class_docstr: Basic wrapper around several `DataLoader`s with factory methods for NLP problems
class_docstr_tok: ["Basic","wrapper","around","several","`","DataLoader","`","s","with","factory","methods","for","NLP","problems"]
docstr: Create from imagenet style dataset in `path` with `train` and `valid` subfolders (or provide `valid_pct`)
docstr_tok: ["Create","from","imagenet","style","dataset","in","`","path","`","with","`","train","`","and","`","valid","`","subfolders","(","or","provide","`","valid_pct","`",")"]
code: def from_folder(
      cls,
      path,
      train="train",
      valid="valid",
      valid_pct=None,
      seed=None,
      vocab=None,
      text_vocab=None,
      is_lm=False,
      tok_tfm=None,
      seq_len=72,
      splitter=None,
      backwards=False,
      **kwargs,
  ):
      "Create from imagenet style dataset in `path` with `train` and `valid` subfolders (or provide `valid_pct`)"
      if splitter is None:
          splitter = (
              GrandparentSplitter(train_name=train, valid_name=valid)
              if valid_pct is None
              else RandomSplitter(valid_pct, seed=seed)
          )
      blocks = [
          TextBlock.from_folder(
              path, text_vocab, is_lm, seq_len, backwards, tok=tok_tfm
          )
      ]
      if not is_lm:
          blocks.append(CategoryBlock(vocab=vocab))
      get_items = (
          partial(get_text_files, folders=[train, valid])
          if valid_pct is None
          else get_text_files
      )
      dblock = DataBlock(
          blocks=blocks,
          get_items=get_items,
          splitter=splitter,
          get_y=None if is_lm else parent_label,
      )
      return cls.from_dblock(
          dblock, path, path=path, seq_len=seq_len, **kwargs
      )
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from .core import *
label_desc: Use image node_id 1 for calling the TextDataLoaders obj's underlying member method code with example usage: obj.from_folder(cls, path, train, valid, valid_pct, seed, vocab, text_vocab, is_lm, tok_tfm, seq_len, splitter, backwards) and returns: cls