class_docstr: Detects abbreviations using the algorithm in "A simple algorithm for identifying
  abbreviation definitions in biomedical text.", (Schwartz & Hearst, 2003).
  
  This class sets the `._.abbreviations` attribute on spaCy Doc.
  
  The abbreviations attribute is a `List[Span]` where each Span has the `Span._.long_form`
  attribute set to the long form definition of the abbreviation.
  
  Note that this class does not replace the spans, or merge them.
  
  Parameters
  ----------
  
  nlp: `Language`, a required argument for spacy to use this as a factory
  name: `str`, a required argument for spacy to use this as a factory
  make_serializable: `bool`, a required argument for whether we want to use the serializable
  or non serializable version.
class_docstr_tok: ["Detects","abbreviations","using","the","algorithm","in","``","A","simple","algorithm","for","identifying","abbreviation","definitions","in","biomedical","text",".","``",",","(","Schwartz","&","Hearst",",","2003",")",".","This","class","sets","the","`","._.abbreviations","`","attribute","on","spaCy","Doc",".","The","abbreviations","attribute","is","a","`","List","[","Span","]","`","where","each","Span","has","the","`","Span._.long_form","`","attribute","set","to","the","long","form","definition","of","the","abbreviation",".","Note","that","this","class","does","not","replace","the","spans",",","or","merge","them",".","Parameters","--","--","--","--","--","nlp",":","`","Language","`",",","a","required","argument","for","spacy","to","use","this","as","a","factory","name",":","`","str","`",",","a","required","argument","for","spacy","to","use","this","as","a","factory","make_serializable",":","`","bool","`",",","a","required","argument","for","whether","we","want","to","use","the","serializable","or","non","serializable","version","."]
code: def __init__(
      self,
      nlp: Language,
      name: str = "abbreviation_detector",
      make_serializable: bool = False,
  ) -> None:
      Doc.set_extension("abbreviations", default=[], force=True)
      Span.set_extension("long_form", default=None, force=True)
  
      self.matcher = Matcher(nlp.vocab)
      self.matcher.add(
          "parenthesis", [[{"ORTH": "("}, {"OP": "+"}, {"ORTH": ")"}]]
      )
      self.make_serializable = make_serializable
      self.global_matcher = Matcher(nlp.vocab)
  
file_path: scispacy/scispacy/abbreviation.py
imports: from typing import Tuple, List, Optional, Set, Dict
  from collections import defaultdict
  from spacy.tokens import Span, Doc
  from spacy.matcher import Matcher
  from spacy.language import Language
label_desc: Use image node_id 1 to create a new AbbreviationDetector object  with example: obj = AbbreviationDetector(nlp, name, make_serializable)