docstr: Convert a paragraph to a list of processed sentences. 
docstr_tok: ["Convert","a","paragraph","to","a","list","of","processed","sentences","."]
code: def para_to_sentences(self, para):
      """Convert a paragraph to a list of processed sentences."""
      res = []
      funcs = []
      for feat_func in self.args["feat_funcs"]:
          if feat_func == "end_of_para" or feat_func == "start_of_para":
              # skip for position-dependent features
              continue
          if feat_func == "space_before":
              func = lambda x: 1 if x.startswith(" ") else 0
          elif feat_func == "capitalized":
              func = lambda x: 1 if x[0].isupper() else 0
          elif feat_func == "numeric":
              func = (
                  lambda x: 1
                  if (NUMERIC_RE.match(x) is not None)
                  else 0
              )
          else:
              raise ValueError(
                  'Feature function "{}" is undefined.'.format(
                      feat_func
                  )
              )
  
          funcs.append(func)
  
      # stacking all featurize functions
      composite_func = lambda x: [f(x) for f in funcs]
  
      def process_sentence(sent_units, sent_labels, sent_feats):
          return (
              np.array([self.vocab.unit2id(y) for y in sent_units]),
              np.array(sent_labels),
              np.array(sent_feats),
              list(sent_units),
          )
  
      use_end_of_para = "end_of_para" in self.args["feat_funcs"]
      use_start_of_para = "start_of_para" in self.args["feat_funcs"]
      use_dictionary = self.args["use_dictionary"]
      current_units = []
      current_labels = []
      current_feats = []
      for i, (unit, label) in enumerate(para):
          feats = composite_func(unit)
          # position-dependent features
          if use_end_of_para:
              f = 1 if i == len(para) - 1 else 0
              feats.append(f)
          if use_start_of_para:
              f = 1 if i == 0 else 0
              feats.append(f)
  
          # if dictionary feature is selected
          if use_dictionary:
              dict_feats = self.extract_dict_feat(para, i)
              feats = feats + dict_feats
  
          current_units.append(unit)
          current_labels.append(label)
          current_feats.append(feats)
          if not self.eval and (
              label == 2 or label == 4
          ):  # end of sentence
              if len(current_units) <= self.args["max_seqlen"]:
                  # get rid of sentences that are too long during training of the tokenizer
                  res.append(
                      process_sentence(
                          current_units, current_labels, current_feats
                      )
                  )
              current_units.clear()
              current_labels.clear()
              current_feats.clear()
  
      if len(current_units) > 0:
          if self.eval or len(current_units) <= self.args["max_seqlen"]:
              res.append(
                  process_sentence(
                      current_units, current_labels, current_feats
                  )
              )
  
      return res
  
imports: from bisect import bisect_right
  from copy import copy
  import numpy
  import random
  import logging
  import re
  import torch
  from torch.utils.data import Dataset
  from .vocab import Vocab
  from stanza.models.common.utils import sort_with_indices, unsort
label_desc: Use image node_id 4 for calling the TokenizationDataset obj's underlying member method code with example usage: obj.para_to_sentences(para) and returns: res, np,  np,  np,  list