Zum Inhalt springen
uencoder

Berechnen TF-IDF for text importance

TF-IDF (Begriff Frequency-Inverse Dokument Frequency) measures Wort importance in ein Dokument relative in ein corpus. Verwendet in search und Text mining.

  1. 1

    TF-IDF = TF × IDF. TF (term frequency) = count of term in document / total terms in document. IDF (inverse document frequency) = log(total documents / documents containing term). Words that appear in many documents get low IDF (common words). Words unique to a document get high IDF (distinctive words). TF-IDF is high for words that are frequent in one document but rare across the corpus.

  2. 2
    Wortzähler →

    Zählen term frequencies in each document. This gives TF (raw count). Normalize by document length for comparable scores across documents of different sizes. Build a vocabulary from all documents.

  3. 3
    Zeichenhäufigkeit →

    Analyze character distribution to understand the text corpus. This complements word-level analysis — some text patterns are character-level (e.g., code, URLs). Use both word and character frequency for comprehensive text analysis.

Häufige Fragen

What does a high TF-IDF score mean?
The word is frequent in this document (high TF) but rare across the corpus (high IDF). This means the word is distinctive to this document — it characterizes the document's topic. Search engines use TF-IDF to rank documents: a query term with high TF-IDF in a document means the document is relevant to the query.
TF-IDF vs BM25?
BM25 is an improved version of TF-IDF used by Elasticsearch and Lucene. It saturates TF (so a word appearing 100 times is not 100x more relevant than once) and normalizes document length. BM25 generally outperforms raw TF-IDF for search ranking. Use BM25 for production search; TF-IDF for teaching and simple applications.

Workflows, die diese Aufgabe lösen

Verwandte Tools