Used to remove words from the completors
770137
def _remove_word(completer):
    
    def inner(word: str):
        try:
            completer.words.remove(word)
        except Exception:
            pass
    return inner
1221304
function cleanSelector (o) {
	var a = o.replace(/\s*,\s*/g, ",").replace(/\n/g, "").split(',');

	a = a.filter( function( item, index, inputArray ) {
		return inputArray.indexOf(item) == index;
	});

	return a.join(',\n');
}
968402
private /*@ helper @*/ void trimLeadingZeros() {
        int i = nWords;
        if (i > 0 && (data[--i] == 0)) {
            //for (; i > 0 && data[i - 1] == 0; i--) ;
            while(i > 0 && data[i - 1] == 0) {
                i--;
            }
            this.nWords = i;
            if (i == 0) { // all words are zero
                this.offset = 0;
            }
        }
    }
1237927
def remove_number_words(text_string):
    '''
    
    '''
    if text_string is None or text_string == "":
        return ""
    elif isinstance(text_string, str):
        for word in NUMBER_WORDS:
            text_string = re.sub(r'[\S]*\b'+word+r'[\S]*', "", text_string)
        return " ".join(text_string.split())
    else:
        raise InputError("string not passed as argument")
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
435855
public static String clear(String text) {
        text = StringCleaner.tokenizeURLs(text);
        text = StringCleaner.tokenizeSmileys(text);
        text = StringCleaner.removeAccents(text);
        text = StringCleaner.removeSymbols(text);
        text = StringCleaner.removeExtraSpaces(text);
        
        return text.toLowerCase(Locale.ENGLISH);
    }
1149670
private String cleanup(String word) {
        int last = word.length();
        String temp = "";
        for (int i = 0; i < last; i++) {
            if ((word.charAt(i) >= 'a') & (word.charAt(i) <= 'z')) {
                temp += word.charAt(i);
            }
        }
        return temp;
    }
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;
    }
1331725
function cleanUpData(data) {
  if (!(data instanceof Tag) && !(data && typeof data.trigger == T_FUNCTION))
    return data

  var o = {}
  for (var key in data) {
    if (!contains(RESERVED_WORDS_BLACKLIST, key))
      o[key] = data[key]
  }
  return o
}
424849
function _unselectWord(wordElement) {
        if (wordElement != null)
            wordElement.className = wordElement.className.split(' ').filter(obj => !/ac__word--selected/.test(obj)).join(' ');
    }
277826
public void clear(String what) 
	{ 
		if (what.equals("blockers")) blockers.clear(); 
		else if (what.equals("datasets")) datasets.clear(); 
		else if (what.equals("learners")) learners.clear();
		else if (what.equals("all")) {
			clear("blockers"); clear("datasets"); clear("learners");
		} else {
			System.out.println("usage: clear blockers|datasets|learners|all");
		}
	}
570218
function removeThisFunction (tokens, index) {
  for (var i = index + 1; i < tokens.length; i++) {
    var token = tokens[i]
    
    if (token.type === "operator") {
      if(token.data === ";") {
        //Remove the trailing newline
        var nextToken = tokens[i+1]
        if(nextToken.type === "whitespace" && nextToken.data[0] === "\n") {
          nextToken.data = nextToken.data.substr(1)
        }

        //Remove the previous tabs or spaces
        var prevToken = tokens[index-1]
        if(prevToken.type === "whitespace") {
          var indentation = prevToken.data.match("[\t ]*$")[0]
          prevToken.data = prevToken.data.substr(0, prevToken.data.length - indentation.length)
        }

        // Pull out the function
        tokens.splice(index, i - index + 1)
        return
      }
    }
  }
}
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)
921486
def clean(self, suffixes=None):
        
        if suffixes is None:
            suffixes = [DONE_SUFFIX, LOCK_SUFFIX, PART_SUFFIX]

        for suffix in suffixes:
            listing = self.working_context.get_listing(suffix)
            for filename in listing:
                self.working_context.remove(filename)
1136771
def deleteword(self, word, **kwargs):
        """"""
        if isstring(word):
            word = self.doc[u(word)]
        return self.correctwords([word], [], **kwargs)
885344
def remove_by(keys, original):
    """"""
    for i in [
            original[index]
            for index, needed in enumerate(keys) if not needed
    ]:
        original.remove(i)
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)