class_docstr: Annotator to match exact phrases (by token) provided in a file against a
  Document.
  
  A text file of predefined phrases must be provided with ``setStoragePath``.
  
  In contrast to the normal ``TextMatcher``, the ``BigTextMatcher`` is
  designed for large corpora.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``DOCUMENT, TOKEN``    ``CHUNK``
  ====================== ======================
  
  Parameters
  ----------
  entities
      ExternalResource for entities
  caseSensitive
      whether to ignore case in index lookups, by default True
  mergeOverlapping
      whether to merge overlapping matched chunks, by default False
  tokenizer
      TokenizerModel to use to tokenize input file for building a Trie
  
  Examples
  --------
  In this example, the entities file is of the form::
  
      ...
      dolore magna aliqua
      lorem ipsum dolor. sit
      laborum
      ...
  
  where each line represents an entity phrase to be extracted.
  
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols("document") \
  ...     .setOutputCol("token")
  >>> data = spark.createDataFrame([["Hello dolore magna aliqua. Lorem ipsum dolor. sit in laborum"]]).toDF("text")
  >>> entityExtractor = BigTextMatcher() \
  ...     .setInputCols("document", "token") \
  ...     .setStoragePath("src/test/resources/entity-extractor/test-phrases.txt", ReadAs.TEXT) \
  ...     .setOutputCol("entity") \
  ...     .setCaseSensitive(False)
  >>> pipeline = Pipeline().setStages([documentAssembler, tokenizer, entityExtractor])
  >>> results = pipeline.fit(data).transform(data)
  >>> results.selectExpr("explode(entity)").show(truncate=False)
  +--------------------------------------------------------------------+
  |col                                                                 |
  +--------------------------------------------------------------------+
  |[chunk, 6, 24, dolore magna aliqua, [sentence -> 0, chunk -> 0], []]|
  |[chunk, 53, 59, laborum, [sentence -> 0, chunk -> 1], []]           |
  +--------------------------------------------------------------------+
class_docstr_tok: ["Annotator","to","match","exact","phrases","(","by","token",")","provided","in","a","file","against","a","Document",".","A","text","file","of","predefined","phrases","must","be","provided","with","``","setStoragePath","``",".","In","contrast","to","the","normal","``","TextMatcher","``",",","the","``","BigTextMatcher","``","is","designed","for","large","corpora",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","DOCUMENT",",","TOKEN","``","``","CHUNK","``","======================","======================","Parameters","--","--","--","--","--","entities","ExternalResource","for","entities","caseSensitive","whether","to","ignore","case","in","index","lookups",",","by","default","True","mergeOverlapping","whether","to","merge","overlapping","matched","chunks",",","by","default","False","tokenizer","TokenizerModel","to","use","to","tokenize","input","file","for","building","a","Trie","Examples","--","--","--","--","In","this","example",",","the","entities","file","is","of","the","form",":",":","...","dolore","magna","aliqua","lorem","ipsum","dolor",".","sit","laborum","...","where","each","line","represents","an","entity","phrase","to","be","extracted",".",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","tokenizer","=","Tokenizer","(",")","\\","...",".setInputCols","(","``","document","''",")","\\","...",".setOutputCol","(","``","token","''",")",">",">",">","data","=","spark.createDataFrame","(","[","[","``","Hello","dolore","magna","aliqua",".","Lorem","ipsum","dolor",".","sit","in","laborum","''","]","]",")",".toDF","(","``","text","''",")",">",">",">","entityExtractor","=","BigTextMatcher","(",")","\\","...",".setInputCols","(","``","document","''",",","``","token","''",")","\\","...",".setStoragePath","(","``","src\/test\/resources\/entity-extractor\/test-phrases.txt","''",",","ReadAs.TEXT",")","\\","...",".setOutputCol","(","``","entity","''",")","\\","...",".setCaseSensitive","(","False",")",">",">",">","pipeline","=","Pipeline","(",")",".setStages","(","[","documentAssembler",",","tokenizer",",","entityExtractor","]",")",">",">",">","results","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","results.selectExpr","(","``","explode","(","entity",")","''",")",".show","(","truncate=False",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|col","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","[","chunk",",","6",",","24",",","dolore","magna","aliqua",",","[","sentence","-",">","0",",","chunk","-",">","0","]",",","[","]","]","|","|","[","chunk",",","53",",","59",",","laborum",",","[","sentence","-",">","0",",","chunk","-",">","1","]",",","[","]","]","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+"]
code: def _create_model(self, java_model):
      return TextMatcherModel(java_model=java_model)
  
file_path: spark-nlp/python/sparknlp/annotator/matcher/big_text_matcher.py
imports: from sparknlp.common import *
  from sparknlp.annotator.matcher.text_matcher import TextMatcherModel
label_desc: Use image node_id 2 for calling the BigTextMatcher obj's underlying member method code with example usage: obj._create_model(java_model) and returns: TextMatcherModel