public static LinkedList<String> findSignificantWords(Path path, int nbWords, HashFunction func, int k) {
    	
    	if (2 * k < nbWords)
    		throw new AssertionError("Too much significant words asked for the given sample size.");
    	
    	SignificantWordsSample ws = new SignificantWordsArraySample(k, func);
    	//SignificantWordsSample ws = new SignificantWordsTreeSample(k, func);
    	
    	for(String str: new WordReader(path))
    		ws.addWord(str);

    	
    	// Extract only nbWords
    	LinkedList<String> wordsList = ws.words();
    	//Collections.shuffle(wordsList);
    	LinkedList<String> l = new LinkedList<String>();
    	for (int i = 0; i < nbWords; i++)
    		l.add(wordsList.removeFirst());
    	
    	return l;
    }