class_docstr: 实现AC自动机的类
  
  Attributes:
      __root: Node类型，AC自动机根节点
docstr: 添加单词word到Trie树中
docstr_tok: ["\u6dfb\u52a0\u5355\u8bcdword\u5230Trie\u6811\u4e2d"]
code: def add_word(self, word):
      """添加单词word到Trie树中"""
      current = self.__root
      for char in word:
          current = current.next.setdefault(char, Node())
      current.length = len(word)
  
file_path: PaddleHub/modules/text/lexical_analysis/lac/ahocorasick.py
label_desc: Use image node_id 2 for calling the Ahocorasick obj's underlying member method code with example usage: obj.add_word(word) without return types