@Override
	public Map<String, Integer> calcul(String[] texte) throws RemoteException, OutOfMemoryError {
		float u = 0;
		for(String s: texte)
			u += s.getBytes().length;
		if(u>capacity && rand.nextInt(100)<(u-capacity)/(9*capacity)*100)
			throw new OutOfMemoryError("Dépacement de capacité mémoire");
		
		HashMap<String, Integer> res = new HashMap<>();
		for(String mot: texte){
			//System.out.println(mot);
			String tmp = mot.replaceAll("[^A-Za-z0-9']", "").toLowerCase();
			int count;
			
			if(mode==0 || rand.nextInt(100)>mode){
				count = 1;
			} else {
				count = rand.nextInt(10);
			}
			
			if(res.containsKey(tmp))
				count+=res.get(tmp);
			
			res.put(tmp, count);
		}
		//System.out.println(res);
		return res;
	}