def count_stems(corpus): """ Renvoie le nombre de racines (stems) distinctes """ stems = pre.stem(corpus) return count_types(stems)
def count_stems(corpus): """ Renvoie le nombre de racines (stems) distinctes """ stemmed_corpus = pre.stem(corpus) stem_count = count_types(stemmed_corpus) pass
def count_stems(corpus): """ Renvoie le nombre de racines (stems) distinctes """ stems = pre.stem(corpus) distinct_stems = set() for sentence in stems: distinct_stems = distinct_stems | set(sentence) return len(distinct_stems)
def count_stems(corpus): """ Renvoie le nombre de racines (stems) distinctes """ return count_types(pre.stem(pre.lemmatize(corpus)))