Configure the curse word portion of our filtering.
544105
protected void configureCurseWords (String curseWords)
    {
        StringTokenizer st = new StringTokenizer(curseWords);
        int numWords = st.countTokens();

        _matchers = new Matcher[numWords];
        _replacements = new String[numWords];
        _vernacular = new String[numWords];
        _comicLength = new int[numWords];

        for (int ii=0; ii < numWords; ii++) {
            String mapping = st.nextToken();
            StringTokenizer st2 = new StringTokenizer(mapping, "=");
            if (st2.countTokens() != 2) {
                log.warning("Something looks wrong in the x.cursewords properties (" +
                    mapping + "), skipping.");
                continue;
            }
            String curse = st2.nextToken();

            String s = "";
            String p = "";
            if (curse.startsWith("*")) {
                curse = curse.substring(1);
                p += "([\\p{L}\\p{Digit}]*)";
                s += "$1";
            } else {
                p += "()";
            }
            s += " ";
            p += " ";
            if (curse.endsWith("*")) {
                curse = curse.substring(0, curse.length() - 1);
                p += "([\\p{L}\\p{Digit}]*)";
                s += "$3";
            }

            String pattern = "\\b" + p.replace(" ", "(" + curse + ")") + "\\b";
            Pattern pat = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
            _matchers[ii] = pat.matcher("");
            _replacements[ii] = s;
            _vernacular[ii] = st2.nextToken().replace('_', ' ');
            _comicLength[ii] = curse.codePointCount(0, curse.length());
        }
    }
94531
def get_profane_words(self):
        """"""
        profane_words = []

        if self._custom_censor_list:
            profane_words = [w for w in self._custom_censor_list]  # Previous versions of Python don't have list.copy()
        else:
            profane_words = [w for w in self._censor_list]

        profane_words.extend(self._extra_censor_list)
        profane_words.extend([inflection.pluralize(word) for word in profane_words])
        profane_words = list(set(profane_words))
        
        # We sort the list based on decreasing word length so that words like
        # 'fu' aren't substituted before 'fuck' if no_word_boundaries = true
        profane_words.sort(key=len)
        profane_words.reverse()

        return profane_words
775163
function properize(word, options) {
  options = _.extend({inflect: false}, options);
  if (!/\./.test(word)) {
    word = changeCase(word);
    if (options.inflect === false) {
      return word;
    }
    return inflection.singularize(word);
  }
  return word;
}
143523
private void setPropertyFilters(String filters) {
		this.filterProperties = new HashSet<>();
		if (!"-".equals(filters)) {
			for (String pid : filters.split(",")) {
				this.filterProperties.add(Datamodel
						.makeWikidataPropertyIdValue(pid));
			}
		}
	}
557773
public void set_filter(filtervalue[] filter) 
	{
		String str = null;
		for (int i = 0; i < filter.length; i++)
		{
			if (str != null)
				str = str + ",";
			if (str == null)
				str = filter[i].get_name() + ":" + nitro_util.encode(filter[i].get_value());
			else
				str = str + filter[i].get_name() + ":" + nitro_util.encode(filter[i].get_value());;
		}
		this.filter = str;
	}
827821
def filter(self):
        '''
        
        '''

        if self.deprecated_filtering_enabled():
            print('warning: event filtering in sensu-plugin is deprecated,' +
                  'see http://bit.ly/sensu-plugin')
            self.filter_disabled()
            self.filter_silenced()
            self.filter_dependencies()

            if self.deprecated_occurrence_filtering():
                print('warning: occurrence filtering in sensu-plugin is' +
                      'deprecated, see http://bit.ly/sensu-plugin')
                self.filter_repeated()
215729
def swear_word(self) -> str:
        
        bad_words = self._data['words'].get('bad')
        return self.random.choice(bad_words)
478767
def reset_filter(self):
        '''
        

        '''
        self.header_desc = self._header_desc
        self.header_data = self._header_data
        self.header_style = self._header_style
        self.desc = self._desc
        self.data = self._data
        self.style = self._style
        self.descdict = self._descdict
        self.datadict = self._datadict
        self.styledict = self._styledict
1214938
def _slugify(text, delim=u'-'):
    """"""
    result = []
    for word in _punct_re.split(text.lower()):
        word = word.encode('utf-8')
        if word:
            result.append(word)
    slugified = delim.join([i.decode('utf-8') for i in result])
    return re.sub('[^a-zA-Z0-9\\s\\-]{1}', replace_char, slugified).lower()
1202030
def AddSlur(self, item):
        '''
        
        '''
        if not hasattr(self, "slurs"):
            self.slurs = []
        self.slurs.append(item)
1221889
def set_filter_raw(self, filter_raw):
        """"""

        self.filter_raw = filter_raw

        self.filter_raw_dict = []
        splitted = re.compile(FILTER_SEPARATOR).split(filter_raw)
        for fltr_raw in splitted:
            fltr = self.__process_filter(fltr_raw)

            self.filter_raw_dict.append(fltr)
765014
def fix_e704(self, result):
        """"""
        (line_index, _, target) = get_index_offset_contents(result,
                                                            self.source)
        match = STARTSWITH_DEF_REGEX.match(target)
        if match:
            self.source[line_index] = '{}\n{}{}'.format(
                match.group(0),
                _get_indentation(target) + self.indent_word,
                target[match.end(0):].lstrip())
592679
def msg_curse(self, args=None, max_width=None):
        """"""
        # Init the return message
        ret = []

        # Only available on GNU/Linux
        # Only process if stats exist and display plugin enable...
        if not LINUX or not self.stats or not self.args.enable_irq:
            return ret

        # Max size for the interface name
        name_max_width = max_width - 7

        # Build the string message
        # Header
        msg = '{:{width}}'.format('IRQ', width=name_max_width)
        ret.append(self.curse_add_line(msg, "TITLE"))
        msg = '{:>9}'.format('Rate/s')
        ret.append(self.curse_add_line(msg))

        for i in self.stats:
            ret.append(self.curse_new_line())
            msg = '{:{width}}'.format(i['irq_line'][:name_max_width],
                                      width=name_max_width)
            ret.append(self.curse_add_line(msg))
            msg = '{:>9}'.format(str(i['irq_rate']))
            ret.append(self.curse_add_line(msg))

        return ret
425400
function sanitize(lang, filter) {
  if(!(typeof lang == 'string')) return lang;
  lang = lang.replace(/\..*$/, '').toLowerCase();
  if(typeof filter == 'function') {
    lang = filter(lang);
  }
  return lang;
}
449858
def clean_description desc
      strip_stopwords(
        desc.gsub(XML_TAG_FILTER,' ')
            .gsub(EMAIL_FILTER,'')
            .gsub(URL_FILTER,'')
            .gsub(GENDER_FILTER,'')
            .gsub(NEW_LINES,'')
            .gsub(SYMBOL_FILTER,' ')
            .gsub(WHITESPACE,' ')
            .gsub(WORDS_IN_BRACKETS, '\1')
            .gsub(CODE_TOKEN_FILTER,'')
            .downcase
            .strip
        )
    end
1286080
def _filtercomment(
            self,
            sql):
        ""
        import os
        fsql = ''
        for line in sql.split('\n'):
            fsql += line.split('--')[0] + ' ' + os.linesep
        return fsql
1071276
function removeFilter (config, filter) {
  if (filter) {
    if (config.filters.ignore[ filter ]) {
      delete config.filters.ignore[ filter ]
    } else {
      delete config.filters.should[ filter ]
    }
  }
}