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: Prepares an instance for combining.
docstr_tok: ["Prepares","an","instance","for","combining","."]
code: def setup(self) -> None:
      """Prepares an instance for combining."""
      if self._schema is not None:
          for k, v in schema_util.get_all_leaf_features(self._schema):
              if v.WhichOneof("domain_info") == _NL_DOMAIN:
                  nld = v.natural_language_domain
                  self._nld_vocabularies[k] = nld.vocabulary
                  coverage_constraints = nld.coverage
                  self._nld_excluded_string_tokens[k] = set(
                      coverage_constraints.excluded_string_tokens
                  )
                  self._nld_excluded_int_tokens[k] = set(
                      coverage_constraints.excluded_int_tokens
                  )
                  self._nld_oov_string_tokens[k] = set(
                      coverage_constraints.oov_string_tokens
                  )
                  sequence_length_constraints = (
                      nld.sequence_length_constraints
                  )
                  self._nld_sequence_length_excluded_int_tokens[
                      k
                  ] = set(
                      sequence_length_constraints.excluded_int_value
                  )
                  self._nld_sequence_length_excluded_string_tokens[
                      k
                  ] = set(
                      sequence_length_constraints.excluded_string_value
                  )
                  if (
                      self._nld_vocabularies[k]
                      or self._nld_excluded_string_tokens[k]
                      or self._nld_excluded_int_tokens[k]
                      or self._nld_oov_string_tokens[k]
                  ):
                      self._valid_feature_paths.add(k)
                  for t in nld.token_constraints:
                      if t.WhichOneof("value") == _INT_VALUE:
                          self._nld_specified_int_tokens[k].add(
                              t.int_value
                          )
                      else:
                          self._nld_specified_str_tokens[k].add(
                              t.string_value
                          )
  
      if self._vocab_paths is not None:
          for k, v in self._vocab_paths.items():
              self._vocabs[k], self._rvocabs[k] = vocab_util.load_vocab(
                  v
              )
  
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 2 for calling the NLStatsGenerator obj's underlying member method code with example usage: obj.setup() without return types