docstr: Segments a text into an list of sentences
  with or withour character offsets from original text
  
  Parameters
  ----------
  language : str, required
      specify a language use its two character ISO 639-1 code,
      by default "en"
  clean : bool, optional
      cleans original text, by default False
  doc_type : [type], optional
      Normal text or OCRed text, by default None
      set to `pdf` for OCRed text
  char_span : bool, optional
      Get start & end character offsets of each sentences
      within original text, by default False
code: def __init__(
      self, language="en", clean=False, doc_type=None, char_span=False
  ):
      """Segments a text into an list of sentences
      with or withour character offsets from original text
  
      Parameters
      ----------
      language : str, required
          specify a language use its two character ISO 639-1 code,
          by default "en"
      clean : bool, optional
          cleans original text, by default False
      doc_type : [type], optional
          Normal text or OCRed text, by default None
          set to `pdf` for OCRed text
      char_span : bool, optional
          Get start & end character offsets of each sentences
          within original text, by default False
      """
      self.language = language
      self.language_module = Language.get_language_code(language)
      self.clean = clean
      self.doc_type = doc_type
      self.char_span = char_span
      if self.clean and self.char_span:
          raise ValueError(
              "char_span must be False if clean is True. "
              "Since `clean=True` will modify original text."
          )
      # when doctype is pdf then force user to clean the text
      # char_span func wont be provided with pdf doctype also
      elif self.doc_type == "pdf" and not self.clean:
          raise ValueError(
              "`doc_type='pdf'` should have `clean=True` & "
              "`char_span` should be False since original"
              "text will be modified."
          )
  
file_path: pySBD/pysbd/segmenter.py
imports: import re
  from pysbd.languages import Language
  from pysbd.processor import Processor
  from pysbd.cleaner import Cleaner
  from pysbd.utils import TextSpan
label_desc: Use image node_id 1 to create a new Segmenter object from inherited base classes: object with example: obj = Segmenter(language, clean, doc_type, char_span)