class_docstr: prefix tree
docstr: add word to prefix tree
docstr_tok: ["add","word","to","prefix","tree"]
code: def addWord(self, text):
      "add word to prefix tree"
      node = self.root
      for i in range(len(text)):
          c = text[i]  # current char
          if c not in node.children:
              node.children[c] = Node()
          node = node.children[c]
          isLast = i + 1 == len(text)
          if isLast:
              node.isWord = True
  
file_path: calamari/calamari_ocr/thirdparty/ctcwordbeamsearch/PrefixTree.py
imports: from __future__ import division
  from __future__ import print_function
label_desc: Use image node_id 2 for calling the PrefixTree obj's underlying member method code with example usage: obj.addWord(text) without return types