class_docstr: TextStats contains following basic information:
docstr: Args:
      total_count: total number of documents
      pattern_stats: a dict maps pattern to its frequency
      word_count: a dict maps term count per doc to its frequency
      char_count: a dict maps character count per doc to its frequency
      term_frequency: a dict maps the term to the total frequency count in the entire document set
      document_frequency: a dict maps the term to the number of documents that contains the term
      tfidf: a dict maps to the term to the average tf-idf
docstr_tok: ["Args",":","total_count",":","total","number","of","documents","pattern_stats",":","a","dict","maps","pattern","to","its","frequency","word_count",":","a","dict","maps","term","count","per","doc","to","its","frequency","char_count",":","a","dict","maps","character","count","per","doc","to","its","frequency","term_frequency",":","a","dict","maps","the","term","to","the","total","frequency","count","in","the","entire","document","set","document_frequency",":","a","dict","maps","the","term","to","the","number","of","documents","that","contains","the","term","tfidf",":","a","dict","maps","to","the","term","to","the","average","tf-idf"]
code: def __init__(
      self,
      total_count: Optional[int],
      pattern_stats: Optional[Dict[str, Tuple[int, int]]] = None,
      word_count: Optional[Dict[int, int]] = None,
      char_count: Optional[Dict[int, int]] = None,
      term_frequency: Optional[Dict[str, int]] = None,
      document_frequency: Optional[Dict[str, int]] = None,
      tfidf: Optional[Dict[str, int]] = None,
  ):
      """
  
      Args:
          total_count: total number of documents
          pattern_stats: a dict maps pattern to its frequency
          word_count: a dict maps term count per doc to its frequency
          char_count: a dict maps character count per doc to its frequency
          term_frequency: a dict maps the term to the total frequency count in the entire document set
          document_frequency: a dict maps the term to the number of documents that contains the term
          tfidf: a dict maps to the term to the average tf-idf
      """
      self.total_count = total_count
      self.pattern_stats = pattern_stats
      self.word_count = word_count
      self.char_count = char_count
      self.term_frequency = term_frequency
      self.document_frequency = document_frequency
      self.tfidf = tfidf
  
imports: from typing import Dict, Optional, Tuple
  from xai.data.abstract_stats import AbstractStats
  from xai.data.constants import STATSKEY
  from xai.data.exceptions import InvalidTypeError, InvalidSizeError
label_desc: Use image node_id 1 to create a new TextStats object from inherited base classes: AbstractStats with example: obj = TextStats(total_count, pattern_stats, word_count, char_count, term_frequency, document_frequency, tfidf)