Remove stop words.
186116
def remove(self, text):
        """"""
        words = text.split(' ')
        stopped_words = [word for word in words if not self.dictionary.contains(word)]

        return ' '.join(stopped_words)
478313
def sanitize_words(self, words):
    
    _words = []
    for w in words:
      if isinstance(w, string_types) and not isinstance(w, unicode):
        _words.append(unicode(w, encoding="utf-8"))
      else:
        _words.append(w)
    return _words
1235275
private String cleanUpString(String text) {
    if (StringUtils.isEmpty(text)) {
      return text;
    }
    else {
      return CONTROL_CHARS.matcher(text).replaceAll("");
    }
  }
599689
def clean_line(str, delimiter):
    """"""

    return [x.strip() for x in str.strip().split(delimiter) if x != '']
237370
def clean(self, text):
        """"""
        return ''.join([c for c in text if c in self.alphabet])
654016
def stopword(self, target, sender, *args):
        
        if target.startswith("#"):
            self.message(target, args[0])
867334
def stop(self):
        """"""
        self._response['shouldEndSession'] = True
        self._response['action']['audio']['interface'] = 'stop'
        self._response['action']['audio']['sources'] = []
        return self
64330
def clean_text(self, text, **kwargs):
        """"""
        text = text.replace(" ", "")
        text = text.upper()
        return text
1232993
def censor(self, input_text):
        """"""
        bad_words = self.get_profane_words()
        res = input_text

        for word in bad_words:
            # Apply word boundaries to the bad word
            regex_string = r'{0}' if self._no_word_boundaries else r'\b{0}\b'
            regex_string = regex_string.format(word)  
            regex = re.compile(regex_string, re.IGNORECASE)
            res = regex.sub(self._censor_char * len(word), res)

        return res
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)
1001650
def _strip(text):
        """"""
        text = text.strip()
        text = text.replace('  ', ' ')  # remove duplicate spaces
        text = text.lower()
        for joiner in TextTitle.JOINERS:
            text = text.replace(joiner, 'and')
        for article in TextTitle.ARTICLES:
            if text.startswith(article + ' '):
                text = text[len(article) + 1:]
                break
        return text
487965
def stop_sequence(self):
    """"""
    return sorted(
      self.stop_times(),
      key=lambda x:int(x.get('stop_sequence'))
    )
440299
@Expose
    public static String decamelize(final String words)
    {
        return SPLIT_CAMEL.matcher(words).replaceAll(SPACE);
    }
589472
def clear_content(self):
        
        for child in self[:]:
            if child.tag == qn('w:pPr'):
                continue
            self.remove(child)
156861
private function finish()
    {
        $this->word = Utf8::str_replace(array('á', 'í', 'ó', 'é', 'ú'), array('a', 'i', 'o', 'e', 'u'), $this->word);
    }
1173173
function removeComplete(regex, lines, start) {
  var matches = lines[start].match(regex);
  var i = 0;
  var s = lines[start];
  matches = s.match(regex);

  while (!matches) {
    i++;
    if ((start + i) > lines.length) return;
    s += lines[start + i];
    matches = s.match(regex);
  }
  lines.splice(start, i + 1);
}
1182986
private String stripPrefixes(String word) {
        String[] prefixes = {"kilo", "micro", "milli", "intra", "ultra", "mega",
            "nano", "pico", "pseudo"};

        int last = prefixes.length;
        for (int i = 0; i < last; i++) {
            if ((word.startsWith(prefixes[i])) && (word.length() > prefixes[i].length())) {
                word = word.substring(prefixes[i].length());
                return word;
            }
        }

        return word;
    }