docstr: :param lexicons: Dict[str, List[List[str]]], maps a topic name to its list of word sequences
  :param definitions, Optional[Dict[str, str]], maps topic name to an explanation.
  :param case_sensitive: bool, are word sequences case-sensitive?
docstr_tok: [":","param","lexicons",":","Dict","[","str",",","List","[","List","[","str","]","]","]",",","maps","a","topic","name","to","its","list","of","word","sequences",":","param","definitions",",","Optional","[","Dict","[","str",",","str","]","]",",","maps","topic","name","to","an","explanation",".",":","param","case_sensitive",":","bool",",","are","word","sequences","case-sensitive","?"]
code: def __init__(
      self,
      lexicons: Dict[str, List[List[str]]],
      definitions: Optional[Dict[str, str]] = None,
      case_sensitive: bool = False,
  ):
      """
      :param lexicons: Dict[str, List[List[str]]], maps a topic name to its list of word sequences
      :param definitions, Optional[Dict[str, str]], maps topic name to an explanation.
      :param case_sensitive: bool, are word sequences case-sensitive?
      """
      self.definitions = definitions
      self.keyword_processor = flashtext.KeywordProcessor(
          case_sensitive
      )
      self.keyword_processor.add_keywords_from_dict(
          {
              topic: [
                  " ".join(term_sequence)
                  for term_sequence in term_sequences
              ]
              for topic, term_sequences in lexicons.items()
          }
      )
  
file_path: scattertext/scattertext/features/CognitiveDistortionsOffsetGetter.py
imports: from typing import Dict, List, Optional
  from scattertext.features.featoffsets.feat_and_offset_getter import FeatAndOffsetGetter
  import flashtext
label_desc: Use image node_id 1 to create a new LexiconFeatAndOffsetGetter object from inherited base classes: FeatAndOffsetGetter with example: obj = LexiconFeatAndOffsetGetter(lexicons, definitions, case_sensitive)