class_docstr: Generates feature level statistics for natural language stats.
  
  A combiner that uses a pluggable NL classifier to generate natural language
  stats for input examples. After the statistics are combined it classifies
  as NL iff both the stats represent enough values (self._values_threshold)
  and the match ratio is high enough (self._match_ratio).
docstr: Initializes a NLDomainInferringStatsGenerator.
  
  Args:
    classifier: A NLClassifier that classifies values as NL.
    match_ratio: In order for a feature to be marked as NL the classifier
      match ratio should meet or exceed this ratio. The ratio should be in
      [0, 1].
    values_threshold: In order for a feature to be marked as NL at least
      this many values should be considered.
  
  Raises:
    ValueError: If values_threshold <= 0 or match_ratio not in [0, 1].
docstr_tok: ["Initializes","a","NLDomainInferringStatsGenerator",".","Args",":","classifier",":","A","NLClassifier","that","classifies","values","as","NL",".","match_ratio",":","In","order","for","a","feature","to","be","marked","as","NL","the","classifier","match","ratio","should","meet","or","exceed","this","ratio",".","The","ratio","should","be","in","[","0",",","1","]",".","values_threshold",":","In","order","for","a","feature","to","be","marked","as","NL","at","least","this","many","values","should","be","considered",".","Raises",":","ValueError",":","If","values_threshold","<","=","0","or","match_ratio","not","in","[","0",",","1","]","."]
code: def __init__(
      self,
      classifier: Optional[NLClassifierInterface] = None,
      match_ratio: float = _MATCH_RATIO,
      values_threshold: int = _VALUES_THRESHOLD,
  ) -> None:
      """Initializes a NLDomainInferringStatsGenerator.
  
      Args:
        classifier: A NLClassifier that classifies values as NL.
        match_ratio: In order for a feature to be marked as NL the classifier
          match ratio should meet or exceed this ratio. The ratio should be in
          [0, 1].
        values_threshold: In order for a feature to be marked as NL at least
          this many values should be considered.
  
      Raises:
        ValueError: If values_threshold <= 0 or match_ratio not in [0, 1].
      """
      super(NLDomainInferringStatsGenerator, self).__init__(
          type(self).__name__
      )
      if classifier is None:
          classifier = AverageWordHeuristicNLClassifier()
      if values_threshold <= 0:
          raise ValueError(
              "NLDomainInferringStatsGenerator expects values_threshold > 0."
          )
      if not 0.0 <= match_ratio <= 1.0:
          raise ValueError(
              "NLDomainInferringStatsGenerator expects a match_ratio in [0, 1]."
          )
      self._classifier = classifier
      self._values_threshold = values_threshold
      self._match_ratio = match_ratio
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Optional
  import numpy
  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 stats_util
  from tfx_bsl.arrow import array_util
  from typing import Iterable, Text
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new NLDomainInferringStatsGenerator object from inherited base classes: stats_generator with example: obj = NLDomainInferringStatsGenerator(classifier, match_ratio, values_threshold)