docstr: Tests generator match ratio with fake heuristic.
docstr_tok: ["Tests","generator","match","ratio","with","fake","heuristic","."]
code: def test_nl_generator_match_ratio_check(self):
      """Tests generator match ratio with fake heuristic."""
      input_batches = [
          pa.array([["MATCH", "MATCH", "MATCH"], ["MATCH", "Nope"]]),
          pa.array([["MATCH", "MATCH", "MATCH"]]),
          pa.array([["12345", "No"]]),
      ]
      # Set values_threshold=5 so it always passes.
      # Try generators with match_ratio 0.71 (should not create stats) and
      # 0.69 (should create stats)
      generator = nlsg.NLDomainInferringStatsGenerator(
          _FakeHeuristic(), match_ratio=0.71, values_threshold=5
      )
      self.assertCombinerOutputEqual(
          input_batches,
          generator,
          statistics_pb2.FeatureNameStatistics(),
      )
  
      generator = nlsg.NLDomainInferringStatsGenerator(
          _FakeHeuristic(), match_ratio=0.69, values_threshold=5
      )
      self.assertCombinerOutputEqual(
          input_batches,
          generator,
          statistics_pb2.FeatureNameStatistics(
              custom_stats=[
                  statistics_pb2.CustomStatistic(
                      name="domain_info",
                      str="natural_language_domain {}",
                  ),
                  statistics_pb2.CustomStatistic(
                      name="natural_language_match_rate", num=0.7
                  ),
              ]
          ),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import absltest
  import pyarrow
  from tensorflow_data_validation.statistics.generators import natural_language_domain_inferring_stats_generator
  from tensorflow_data_validation.utils import test_util
  from typing import Text
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 11 for calling the NaturalLanguageStatsGeneratorTest obj's underlying member method code with example usage: obj.test_nl_generator_match_ratio_check() without return types