docstr: Test AllWordConfidences and MapWordConfidences.
docstr_tok: ["Test","AllWordConfidences","and","MapWordConfidences","."]
code: def test_word_confidences(self):
      """Test AllWordConfidences and MapWordConfidences."""
      self._api.SetImageFile(self._image_file)
      words = self._api.AllWords()
      self.assertEqual(words, [])
      self._api.Recognize()
      words = self._api.AllWords()
      confidences = self._api.AllWordConfidences()
      self.assertEqual(len(words), len(confidences))
      mapped_confidences = self._api.MapWordConfidences()
      self.assertEqual([v[0] for v in mapped_confidences], words)
      self.assertEqual([v[1] for v in mapped_confidences], confidences)
  
imports: import unittest
  import re
  import os.path
  import tesserocr
label_desc: Use image node_id 14 for calling the TestTessBaseApi obj's underlying member method code with example usage: obj.test_word_confidences() without return types