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: Return result of folding a batch of inputs into accumulator.
  
  Args:
    accumulator: The current accumulator.
    feature_path: The path of the feature.
    feature_array: An arrow Array representing a batch of feature values
      which should be added to the accumulator.
  
  Returns:
    The accumulator after updating the statistics for the batch of inputs.
docstr_tok: ["Return","result","of","folding","a","batch","of","inputs","into","accumulator",".","Args",":","accumulator",":","The","current","accumulator",".","feature_path",":","The","path","of","the","feature",".","feature_array",":","An","arrow","Array","representing","a","batch","of","feature","values","which","should","be","added","to","the","accumulator",".","Returns",":","The","accumulator","after","updating","the","statistics","for","the","batch","of","inputs","."]
code: def add_input(
      self,
      accumulator: _PartialNLStats,
      feature_path: types.FeaturePath,
      feature_array: pa.Array,
  ) -> _PartialNLStats:
      """Return result of folding a batch of inputs into accumulator.
  
      Args:
        accumulator: The current accumulator.
        feature_path: The path of the feature.
        feature_array: An arrow Array representing a batch of feature values
          which should be added to the accumulator.
  
      Returns:
        The accumulator after updating the statistics for the batch of inputs.
      """
      if accumulator.invalidate:
          return accumulator
      feature_type = stats_util.get_feature_type_from_arrow_type(
          feature_path, feature_array.type
      )
      # Ignore null array.
      if feature_type is None:
          return accumulator
      # If we see a different type, invalidate.
      if feature_type != statistics_pb2.FeatureNameStatistics.STRING:
          accumulator.invalidate = True
          return accumulator
  
      def _is_non_utf8(value):
          return (
              isinstance(value, bytes)
              and stats_util.maybe_get_utf8(value) is None
          )
  
      is_non_utf_vec = np.vectorize(_is_non_utf8, otypes=[bool])
      classify_vec = np.vectorize(
          self._classifier.classify, otypes=[bool]
      )
      values = np.asarray(
          array_util.flatten_nested(feature_array)[0].slice(
              0, _CROP_AT_VALUES
          )
      )
      if np.any(is_non_utf_vec(values)):
          accumulator.invalidate = True
          return accumulator
      accumulator.considered += values.size
      accumulator.matched += np.sum(classify_vec(values))
      return accumulator
  
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 3 for calling the NLDomainInferringStatsGenerator obj's underlying member method code with example usage: obj.add_input(accumulator, feature_path, feature_array) and returns: accumulator, accumulator, accumulator, accumulator, unknown, accumulator