Déramise une chaîne
    
    :param string: Chaîne à transformer
    :type string: str
    :return: Chaîne nettoyée
    :rtype: str
972291
def deramise(r):
    
    return r.replace('J', 'I') \
            .replace('j', 'i') \
            .replace('v', 'u') \
            .replace("æ", "ae") \
            .replace("Æ", "Ae") \
            .replace("œ", "oe") \
            .replace("Œ", "Oe") \
            .replace("ụ", 'u') \
            .replace('V', 'U')
218477
def _strfactory(cls, line):
        

        assert type(line) == str, "this is a factory from string"

        line = line.rstrip().split()[1:] # the first component is the keyword "chain"
        tup = [t[0](t[1]) for t in zip([int, str, int, str, int, int, str, int, str, int, int, str], line)]
        return tuple.__new__(cls, tup)
1234495
def destringize(self, string):
        

        m = segment_destr_pattern.match(string)
        self.genome_id = int(m.group(1))
        self.chr_id = int(m.group(2))
        self.direction = m.group(3)
        self.left = int(m.group(4))
        self.right = int(m.group(5))
1129087
def split_ref(string):
    
    re_tag = re.compile('^(?P<tag>[a-zA-Z]+)[\s-]*(?P<pk>\d+)$')
    m = re_tag.search(string)
    if not m:
        raise ValueError("unable to split string '%s'" % (string, ))

    return (m.group('tag').lower(), int(m.group('pk')))
856093
def sub(self, replace, string, count=0):
      
      return self.re.sub(replace, string, count)
874271
public void ecrire(String texte)
	{
		//on va chercher le chemin et le nom du fichier et on me tout ca dans un String
		String adressedufichier = System.getProperty("user.dir") + "\\monfichier.txt";
	
		//on me try si jamais il y a une exception
		try
		{
			
			//BufferedWriter a besoin d un FileWriter, 
			//les 2 vont ensemble, on donne comme argument le nom du fichier
			//true signifie qu on ajoute dans le fichier (append), on ne marque pas par dessus 
			FileWriter fw = new FileWriter(adressedufichier, true);
			
			// le BufferedWriter output auquel on donne comme argument le FileWriter fw cree juste au dessus
			BufferedWriter output = new BufferedWriter(fw);
			
			//on marque dans le fichier ou plutot dans le BufferedWriter qui sert comme un tampon(stream)
			output.write(texte);
			//on peut utiliser plusieurs fois methode write
			
			output.flush();
			//ensuite flush envoie dans le fichier, ne pas oublier cette methode pour le BufferedWriter
			
			output.close();
			//et on le ferme
			
		}
		catch(IOException ioe){System.out.println("erreur : " + ioe );}
		//on "catch" l exception ici si il y en a une, et on l affiche sur la console 

	}
557459
def _normalize_string(raw_str):
  
  return " ".join(
      token.strip()
      for token in tokenizer.encode(text_encoder.native_to_unicode(raw_str)))
486475
def convert(self, string, preprocess = None):
        
        string = unicode(preprocess(string) if preprocess else string, encoding="utf-8")
        if self.regex:
            return self.regex.sub(lambda x: self.substitutes[x.group()], string).encode('utf-8')
        else:
            return string
1207483
def str_to_list(
    input_str,
    item_converter=lambda x: x,
    item_separator=',',
    list_to_collection_converter=None,
):
    
    if not isinstance(input_str, six.string_types):
        raise ValueError(input_str)
    input_str = str_quote_stripper(input_str)
    result = [
        item_converter(x.strip())
        for x in input_str.split(item_separator) if x.strip()
    ]
    if list_to_collection_converter is not None:
        return list_to_collection_converter(result)
    return result
585067
def text_normalize(text):
    
    # if not isinstance(text, str):
    if isinstance(text, bytes):
        # -- MAYBE: command.ouput => bytes, encoded stream output.
        text = codecs.decode(text)
    lines = [ line.strip()  for line in text.splitlines()  if line.strip() ]
    return "\n".join(lines)
369313
def _string_put_transform(cls, item, **kwargs):
        '''
        
        '''
        if isinstance(item, six.string_types):
            if item.lower() == 'not defined':
                return None
            else:
                return item
813732
def preprocess(string):
    
    string = unicode(string, encoding="utf-8")
    return regex.sub('', string).encode('utf-8')
556429
def string(self, *args):
        
        data = self.bytes(*args)
        if data is not None:
            return data.rstrip(b"\x00").decode('utf-8')
513953
def _normalize_str(self, string):
        
        if string:
            if not isinstance(string, str):
                string = str(string, 'utf-8', 'replace')

            return unicodedata.normalize('NFKD', string).encode(
                'ASCII', 'ignore').decode('ASCII')
        return ''
1298495
def normalize_value(text):
    
    result = text.replace('\n', ' ')
    result = re.subn('[ ]{2,}', ' ', result)[0]
    return result
1038668
public function transform($string)
    {
        foreach ($this->collection->getTransformers() as $transformer) {
            $string = $transformer->transform($string);
        }
        return $string;
    }
314589
def String(self, str):
        
        ret = libxml2mod.xmlTextReaderConstString(self._o, str)
        return ret