class_docstr: Generates feature level statistics for natural language stats.
  
  A combiner that computes statistics based on the specified
  natural_language_domain.
class_docstr_tok: ["Generates","feature","level","statistics","for","natural","language","stats",".","A","combiner","that","computes","statistics","based","on","the","specified","natural_language_domain","."]
docstr: Initializes a NLStatsGenerator.
  
  Args:
    schema: An optional schema for the dataset.
    vocab_paths: A dictonary mapping vocab names to vocab paths.
    num_histogram_buckets: Number of buckets to use for histograms.
    num_quantiles_histogram_buckets: Number of quantiles to use for
      histograms.
    num_rank_histogram_buckets: Number of buckets to allow for rank
      histograms.
docstr_tok: ["Initializes","a","NLStatsGenerator",".","Args",":","schema",":","An","optional","schema","for","the","dataset",".","vocab_paths",":","A","dictonary","mapping","vocab","names","to","vocab","paths",".","num_histogram_buckets",":","Number","of","buckets","to","use","for","histograms",".","num_quantiles_histogram_buckets",":","Number","of","quantiles","to","use","for","histograms",".","num_rank_histogram_buckets",":","Number","of","buckets","to","allow","for","rank","histograms","."]
code: def __init__(
      self,
      schema: Optional[schema_pb2.Schema],
      vocab_paths: Optional[Dict[Text, Text]],
      num_histogram_buckets: int,
      num_quantiles_histogram_buckets: int,
      num_rank_histogram_buckets: int,
  ) -> None:
      """Initializes a NLStatsGenerator.
  
      Args:
        schema: An optional schema for the dataset.
        vocab_paths: A dictonary mapping vocab names to vocab paths.
        num_histogram_buckets: Number of buckets to use for histograms.
        num_quantiles_histogram_buckets: Number of quantiles to use for
          histograms.
        num_rank_histogram_buckets: Number of buckets to allow for rank
          histograms.
      """
      self._schema = schema
      self._vocab_paths = vocab_paths
      self._num_histogram_buckets = num_histogram_buckets
      self._num_quantiles_histogram_buckets = (
          num_quantiles_histogram_buckets
      )
      assert (
          num_rank_histogram_buckets <= _NUM_MISRAGRIES_SKETCH_BUCKETS
      ), (
          "num_rank_histogram_buckets cannot be greater than %d"
          % _NUM_MISRAGRIES_SKETCH_BUCKETS
      )
      self._num_rank_histogram_buckets = num_rank_histogram_buckets
      self._nld_vocabularies = {}
      self._nld_excluded_string_tokens = {}
      self._nld_excluded_int_tokens = {}
      self._nld_oov_string_tokens = {}
      self._nld_specified_int_tokens = collections.defaultdict(set)
      self._nld_specified_str_tokens = collections.defaultdict(set)
      self._nld_sequence_length_excluded_int_tokens = {}
      self._nld_sequence_length_excluded_string_tokens = {}
      self._vocabs = {}
      self._rvocabs = {}
      self._feature_type_fns = {
          statistics_pb2.FeatureNameStatistics.INT: _compute_int_statistics,
          statistics_pb2.FeatureNameStatistics.STRING: _compute_str_statistics,
      }
      self._valid_feature_paths = set()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Dict, Iterable, List, Optional, Set, Text, Union
  import pyarrow
  import six
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import quantiles_util
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_data_validation.utils import vocab_util
  from tfx_bsl import sketches
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 1 to create a new NLStatsGenerator object from inherited base classes: stats_generator with example: obj = NLStatsGenerator(schema, vocab_paths, num_histogram_buckets, num_quantiles_histogram_buckets, num_rank_histogram_buckets)