class_docstr: Old segment -> revised segment.
  
  Data filtration heuristics:
    wiki_revision_max_page_size_exp:
      pages above this # of bytes are thrown out
  
    wiki_revision_revision_skip_factor:
      rate of logarithmic downsampling of revision history list
  
    wiki_revision_percent_identical_examples:
      how many identitcal examples to admit, as percent of total examples
  
    wiki_revision_introduce_errors:
      whether or not to introduce spelling-type errors on the source side
  
    wiki_revision_max_equal_to_diff_ratio:
      whether or not to introduce spelling-type errors on the source side
  
  
  Vocab size=32k
  Maximum input/target length = 1024 wordpiece tokens
class_docstr_tok: ["Old","segment","-",">","revised","segment",".","Data","filtration","heuristics",":","wiki_revision_max_page_size_exp",":","pages","above","this","#","of","bytes","are","thrown","out","wiki_revision_revision_skip_factor",":","rate","of","logarithmic","downsampling","of","revision","history","list","wiki_revision_percent_identical_examples",":","how","many","identitcal","examples","to","admit",",","as","percent","of","total","examples","wiki_revision_introduce_errors",":","whether","or","not","to","introduce","spelling-type","errors","on","the","source","side","wiki_revision_max_equal_to_diff_ratio",":","whether","or","not","to","introduce","spelling-type","errors","on","the","source","side","Vocab","size=32k","Maximum","input\/target","length","=","1024","wordpiece","tokens"]
code: def page_to_examples(self, page, encoder):
      revisions = page["revisions"]
      self.num_revisions_total += len(revisions)
      if len(revisions) < 2:
          return []
      revisions = [
          wiki_revision_utils.get_text(r)
          for n, r in enumerate(revisions)
          if wiki_revision_utils.include_revision(
              n, self.wiki_revision_skip_factor
          )
          or n + 1 == len(revisions)
      ]
      self.num_revisions_admitted += len(revisions)
  
      ret = []
      for i in range(len(revisions) - 1):
          old_revision = revisions[i]
          new_revision = revisions[i + 1]
  
          if FLAGS.wiki_revision_introduce_errors:
              (
                  old_revision_text,
                  num_added_err,
              ) = wiki_revision_utils.introduce_errors(revisions[i])
              if num_added_err:
                  self.num_introduced_errors += num_added_err
                  self.num_examples_with_introduced_error += 1
          else:
              old_revision_text = revisions[i]
          new_revision_text = revisions[i + 1]
          if encoder:
              # Encode text into list of ids, if a text encoder is present.
              old_revision = encoder.encode(old_revision_text)
              new_revision = encoder.encode(new_revision_text)
          else:
              # Retain text (as list of characters), if a text encoder is not present.
              old_revision = old_revision_text
              new_revision = new_revision_text
          ret.extend(
              self.make_examples(
                  encoder,
                  old_revision,
                  new_revision,
                  max_length=self.max_segment_length,
                  percent_identical_examples=FLAGS.wiki_revision_percent_identical_examples,
              )
          )
      return ret
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import random
  from absl import flags
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators import wiki_revision_utils
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 9 for calling the WikiRevision obj's underlying member method code with example usage: obj.page_to_examples(page, encoder) and returns: ret, list