fonction which compute tfidf + improvement in the doc details