Process a list of `texts` in one process.
496603
def _process_all_1(self, texts:Collection[str]) -> List[List[str]]:
        ""
        tok = self.tok_func(self.lang)
        if self.special_cases: tok.add_special_cases(self.special_cases)
        return [self.process_text(str(t), tok) for t in texts]
1305314
def _clean_text(self, text):
        """"""
        output = []
        for char in text:
            cp = ord(char)
            if cp in (0, 0xfffd) or self._is_control(char):
                continue
            if self._is_whitespace(char):
                output.append(' ')
            else:
                output.append(char)
        return ''.join(output)
513383
def from_text(cls, text: str):
        

        eidosProcessor = process_text(text)
        return cls.from_statements(eidosProcessor.statements)
682495
def try_process_text(self, text):
        
        if not text:
            return text
        try:
            return self.process_text(text)
        except (socket.gaierror, socket.timeout, xml.parsers.expat.ExpatError):
            return text
1024432
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
    private static Iterable<Directive> transform(final Iterable<String> texts) {
        final Collection<Directive> list = new LinkedList<>();
        for (final String text : texts) {
            try {
                for (final Directive dir : new Directives(text)) {
                    list.add(dir);
                }
            } catch (final SyntaxException ex) {
                throw new IllegalStateException(ex);
            }
        }
        return list;
    }
1036085
def reach_process_text():
    """"""
    if request.method == 'OPTIONS':
        return {}
    response = request.body.read().decode('utf-8')
    body = json.loads(response)
    text = body.get('text')
    offline = True if body.get('offline') else False
    rp = reach.process_text(text, offline=offline)
    return _stmts_from_proc(rp)
322562
def process_document(self, doc):
        

        segment = doc.select_segments("target_text")[0]

        for e in self.e_list:
            res = doc.extract(e, segment)
            doc.store(res, e.name)
        return list()
201335
private void processFiles() {
		StringBuffer buf = new StringBuffer();
		appendFileDetails(buf, allFiles);
		appendFileDetails(buf, textFiles);
		appendFileDetails(buf, pdfFiles);
		console.setText(buf.toString());
	}
431210
function processText(text, filename, options) {

    var filePath,
        messages,
        stats;

    if (filename) {
        filePath = path.resolve(filename);
    }

    filename = filename || "<text>";
    debug("Linting " + filename);


    messages = bemlint.verify(text, lodash.assign(Object.create(null), {
        filename: filename
    }, options));

    stats = calculateStatsPerFile(messages);

    var result = {
        filePath: filename,
        messages: messages,
        errorCount: stats.errorCount,
        warningCount: stats.warningCount
    };

    return result;
}
437414
def process_tokens(self, tokens):
        
        """
        for (tok_type, token, (start_row, _), _, _) in tokens:
            if tok_type == tokenize.STRING:
                self._check_string(token, start_row)
844900
private void processFunctions(String name, String text, String type,
      List<MtasCRMParserFunctionOutput> functionOutputList) {
    if (functions.containsKey(type) && functions.get(type).containsKey(name)
        && text != null) {
      MtasCRMParserFunction function = functions.get(type).get(name);
      String[] value;
      if (function.split != null) {
        value = text.split(Pattern.quote(function.split));
      } else {
        value = new String[] { text };
      }
      for (int c = 0; c < value.length; c++) {
        boolean checkedEmpty = false;
        if (value[c].equals("")) {
          checkedEmpty = true;
        }
        if (function.output.containsKey(value[c])) {
          ArrayList<MtasCRMParserFunctionOutput> list = function.output
              .get(value[c]);
          for (MtasCRMParserFunctionOutput listItem : list) {
            functionOutputList.add(listItem.create(value[c]));
          }
        }
        if (!checkedEmpty && function.output.containsKey("")) {
          ArrayList<MtasCRMParserFunctionOutput> list = function.output.get("");
          for (MtasCRMParserFunctionOutput listItem : list) {
            functionOutputList.add(listItem.create(value[c]));
          }
        }
      }
    }
  }
161321
def __normalize_list(self, msg):
        """"""
        if isinstance(msg, list):
            msg = "".join(msg)
        return list(map(lambda x: x.strip(), msg.split(",")))
1373151
def run(self, text):
        
        for pp in self.pre_processors:
            text = pp.run(text)
        return text
1002687
def _parse_list(self, text, i):
        """"""

        res = []
        end_match = self.end_list_re.match(text, i)
        old_current_type = self.current_type
        while not end_match:
            list_item, i = self._parse(text, i)
            res.append(list_item)

            end_match = self.end_list_re.match(text, i)

            if not end_match:
                m = self.list_delim_re.match(text, i)
                if not m:
                    self._fail("Missing delimiter in list before content", text, i)
                parsed = m.group(0)
                i += len(parsed)
            self.current_type = old_current_type

        parsed = end_match.group(0)
        i += len(parsed)
        return res, i
273364
def parse_content(self, text):
        """"""
        raw_content = self.raw_content
        raw_content.clear()
        formal_collect = {}

        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            try:
                split = self.visible_empty_line_re.split(text)
            except ValueError:  # python >= 3.5
                split = [text]

        option_split_re = self.option_split_re
        name = re.compile(re.escape(self.option_name), re.IGNORECASE)
        for text in filter(lambda x: x and x.strip(), split):

            # logger.warning('get options group:\n%r', text)
            with warnings.catch_warnings():
                warnings.simplefilter("ignore")
                try:
                    split_options = option_split_re.split(text)
                except ValueError:  # python >= 3.5
                    continue

            split_options.pop(0)

            for title, section in zip(split_options[::2], split_options[1::2]):
                prefix, end = name.split(title)

                prefix = prefix.strip()

                section = section.rstrip()
                if end.endswith('\n'):
                    formal = section
                else:
                    formal = ' ' * len(title) + section

                formal_collect.setdefault(prefix, []).append(formal)

                # logger.error((title, section))
                if prefix in raw_content:
                    # TODO: better handling way?
                    if self.namedoptions:
                        log = logger.warning
                    else:
                        log = logger.debug
                    log('duplicated options section %s', prefix)

                    raw_content[prefix] += '\n%s%s' % (title, section)
                else:
                    raw_content[prefix] = title + section

        if formal_collect:
            for each_title, values in formal_collect.items():
                value = '\n'.join(map(textwrap.dedent, values))
                formal_collect[each_title] = value

        self.formal_content = formal_collect
604151
def lex(self, text):
        """"""
        for match in self.regex.finditer(text):
            name = match.lastgroup
            yield (name, match.group(name))
920305
def _process_layout(self, layout):
        """"""
        # Here we just group text into paragraphs
        elements = []
        for lt_obj in layout:
            if isinstance(lt_obj, LTTextBox) or isinstance(lt_obj, LTTextLine):
                elements.append(Paragraph(lt_obj.get_text().strip()))
            elif isinstance(lt_obj, LTFigure):
                # Recursive...
                elements.extend(self._process_layout(lt_obj))
        return elements