class_docstr: KeywordProcessor
  
  Attributes:
      _keyword (str): Used as key to store keywords in trie dictionary.
          Defaults to '_keyword_'
      non_word_boundaries (set(str)): Characters that will determine if the word is continuing.
          Defaults to set([A-Za-z0-9_])
      keyword_trie_dict (dict): Trie dict built character by character, that is used for lookup
          Defaults to empty dictionary
      case_sensitive (boolean): if the search algorithm should be case sensitive or not.
          Defaults to False
  
  Examples:
      >>> # import module
      >>> from flashtext import KeywordProcessor
      >>> # Create an object of KeywordProcessor
      >>> keyword_processor = KeywordProcessor()
      >>> # add keywords
      >>> keyword_names = ['NY', 'new-york', 'SF']
      >>> clean_names = ['new york', 'new york', 'san francisco']
      >>> for keyword_name, clean_name in zip(keyword_names, clean_names):
      >>>     keyword_processor.add_keyword(keyword_name, clean_name)
      >>> keywords_found = keyword_processor.extract_keywords('I love SF and NY. new-york is the best.')
      >>> keywords_found
      >>> ['san francisco', 'new york', 'new york']
  
  Note:
      * loosely based on `Aho-Corasick algorithm <https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm>`_.
      * Idea came from this `Stack Overflow Question <https://stackoverflow.com/questions/44178449/regex-replace-is-taking-time-for-millions-of-documents-how-to-make-it-faster>`_.
class_docstr_tok: ["KeywordProcessor","Attributes",":","_keyword","(","str",")",":","Used","as","key","to","store","keywords","in","trie","dictionary",".","Defaults","to","'_keyword_'","non_word_boundaries","(","set","(","str",")",")",":","Characters","that","will","determine","if","the","word","is","continuing",".","Defaults","to","set","(","[","A-Za-z0-9_","]",")","keyword_trie_dict","(","dict",")",":","Trie","dict","built","character","by","character",",","that","is","used","for","lookup","Defaults","to","empty","dictionary","case_sensitive","(","boolean",")",":","if","the","search","algorithm","should","be","case","sensitive","or","not",".","Defaults","to","False","Examples",":",">",">",">","#","import","module",">",">",">","from","flashtext","import","KeywordProcessor",">",">",">","#","Create","an","object","of","KeywordProcessor",">",">",">","keyword_processor","=","KeywordProcessor","(",")",">",">",">","#","add","keywords",">",">",">","keyword_names","=","[","'NY","'",",","'new-york","'",",","'SF","'","]",">",">",">","clean_names","=","[","'new","york","'",",","'new","york","'",",","'san","francisco","'","]",">",">",">","for","keyword_name",",","clean_name","in","zip","(","keyword_names",",","clean_names",")",":",">",">",">","keyword_processor.add_keyword","(","keyword_name",",","clean_name",")",">",">",">","keywords_found","=","keyword_processor.extract_keywords","(","'","I","love","SF","and","NY",".","new-york","is","the","best",".","'",")",">",">",">","keywords_found",">",">",">","[","'san","francisco","'",",","'new","york","'",",","'new","york","'","]","Note",":","*","loosely","based","on","`","Aho-Corasick","algorithm","<","https",":","\/\/en.wikipedia.org\/wiki\/Aho","%","E2","%","80","%","93Corasick_algorithm",">","`","_",".","*","Idea","came","from","this","`","Stack","Overflow","Question","<","https",":","\/\/stackoverflow.com\/questions\/44178449\/regex-replace-is-taking-time-for-millions-of-documents-how-to-make-it-faster",">","`","_","."]
docstr: Recursively builds a dictionary of keywords present in the dictionary
  And the clean name mapped to those keywords.
  
  Args:
      term_so_far : string
          term built so far by adding all previous characters
      current_dict : dict
          current recursive position in dictionary
  
  Returns:
      terms_present : dict
          A map of key and value where each key is a term in the keyword_trie_dict.
          And value mapped to it is the clean name mapped to it.
  
  Examples:
      >>> keyword_processor = KeywordProcessor()
      >>> keyword_processor.add_keyword('j2ee', 'Java')
      >>> keyword_processor.add_keyword('Python', 'Python')
      >>> keyword_processor.get_all_keywords()
      >>> {'j2ee': 'Java', 'python': 'Python'}
      >>> # NOTE: for case_insensitive all keys will be lowercased.
docstr_tok: ["Recursively","builds","a","dictionary","of","keywords","present","in","the","dictionary","And","the","clean","name","mapped","to","those","keywords",".","Args",":","term_so_far",":","string","term","built","so","far","by","adding","all","previous","characters","current_dict",":","dict","current","recursive","position","in","dictionary","Returns",":","terms_present",":","dict","A","map","of","key","and","value","where","each","key","is","a","term","in","the","keyword_trie_dict",".","And","value","mapped","to","it","is","the","clean","name","mapped","to","it",".","Examples",":",">",">",">","keyword_processor","=","KeywordProcessor","(",")",">",">",">","keyword_processor.add_keyword","(","'j2ee","'",",","'Java","'",")",">",">",">","keyword_processor.add_keyword","(","'Python","'",",","'Python","'",")",">",">",">","keyword_processor.get_all_keywords","(",")",">",">",">","{","'j2ee","'",":","'Java","'",",","'python","'",":","'Python","'","}",">",">",">","#","NOTE",":","for","case_insensitive","all","keys","will","be","lowercased","."]
code: def get_all_keywords(self, term_so_far="", current_dict=None):
      """Recursively builds a dictionary of keywords present in the dictionary
      And the clean name mapped to those keywords.
  
      Args:
          term_so_far : string
              term built so far by adding all previous characters
          current_dict : dict
              current recursive position in dictionary
  
      Returns:
          terms_present : dict
              A map of key and value where each key is a term in the keyword_trie_dict.
              And value mapped to it is the clean name mapped to it.
  
      Examples:
          >>> keyword_processor = KeywordProcessor()
          >>> keyword_processor.add_keyword('j2ee', 'Java')
          >>> keyword_processor.add_keyword('Python', 'Python')
          >>> keyword_processor.get_all_keywords()
          >>> {'j2ee': 'Java', 'python': 'Python'}
          >>> # NOTE: for case_insensitive all keys will be lowercased.
      """
      terms_present = {}
      if not term_so_far:
          term_so_far = ""
      if current_dict is None:
          current_dict = self.keyword_trie_dict
      for key in current_dict:
          if key == "_keyword_":
              terms_present[term_so_far] = current_dict[key]
          else:
              sub_values = self.get_all_keywords(
                  term_so_far + key, current_dict[key]
              )
              for key in sub_values:
                  terms_present[key] = sub_values[key]
      return terms_present
  
imports: import os
  import string
  import io
label_desc: Use image node_id 18 for calling the KeywordProcessor obj's underlying member method code with example usage: obj.get_all_keywords(term_so_far, current_dict) and returns: terms_present