YAKE (Yet Another Keyword Extractor) is an unsupervised, corpus-independent algorithm that extracts keyphrases from a single document using five statistical features: casing, word position, word frequency, word relatedness to context, and word dispersion across sentences. It computes a final score for each candidate n-gram by multiplying these features, with lower scores indicating higher relevance. The method requires no external knowledge bases, making it highly portable and domain-agnostic.
Glossary
YAKE

What is YAKE?
YAKE is a lightweight, unsupervised keyphrase extraction algorithm that identifies relevant terms from a single document by leveraging statistical features without requiring external corpora or training data.
The algorithm first segments text into sentences and tokens, then generates candidate phrases up to a maximum n-gram length (typically trigrams). Candidate scoring penalizes words that appear frequently across many sentences (low dispersion) while rewarding words that cluster in specific contexts. A deduplication step removes substrings with identical scores, and a final ranking returns the top-scoring phrases. YAKE excels in scenarios where labeled training data is unavailable and computational efficiency is paramount.
Key Features of YAKE
YAKE (Yet Another Keyword Extractor) is a lightweight, unsupervised algorithm that extracts keyphrases from a single document using statistical features without requiring external corpora or training data.
Statistical Feature Scoring
YAKE computes five distinct statistical features for each candidate term to determine its relevance:
- Casing: Rewards capitalized and acronym terms, penalizing lowercase words that are less likely to be important
- Term Position: Boosts terms appearing early in the document, where key concepts are typically introduced
- Term Frequency Normalization: Balances raw frequency against the frequency of sub-terms to prevent common words from dominating
- Term Relatedness to Context: Measures how many different terms co-occur with the candidate, penalizing stopword-like behavior
- Sentence Frequency: Rewards terms that appear across multiple sentences, indicating broader topical relevance
These features are combined into a single score, with lower values indicating higher keyword relevance.
Single-Document Processing
Unlike TF-IDF which requires a reference corpus to compute inverse document frequency, YAKE operates entirely on a single input document. This makes it ideal for:
- Processing isolated documents where no corpus exists
- Real-time applications with streaming text
- Edge deployments with limited storage
- Privacy-sensitive contexts where external data access is restricted
The algorithm builds its statistical model solely from the internal structure and distribution of terms within the provided text, eliminating corpus dependency entirely.
Sliding Window Co-occurrence
YAKE constructs a co-occurrence graph using a sliding window of configurable size (default: 10 words) across the document. This captures local semantic relationships:
- Words appearing together frequently within the window receive higher relatedness scores
- The window size can be tuned: smaller windows capture tight phrases, larger windows capture broader topical associations
- This graph-based approach allows YAKE to identify multi-word expressions without relying on external phrase dictionaries
The co-occurrence statistics feed directly into the term relatedness feature, distinguishing content-bearing terms from functional words.
N-Gram Candidate Generation
YAKE generates candidate keyphrases by extracting contiguous n-grams up to a maximum length (default: 3 words). The process:
- Splits text on stopwords and punctuation to identify phrase boundaries
- Generates all possible 1-gram, 2-gram, and 3-gram sequences from these segments
- Scores each candidate using the combined statistical features
- Applies deduplication to remove redundant overlapping phrases
The stopword-delimited segmentation naturally identifies phrase boundaries without requiring part-of-speech tagging or syntactic parsing, keeping the algorithm fast and language-agnostic.
Language Independence
YAKE achieves broad language support through its reliance on statistical patterns rather than linguistic rules. Key design choices:
- Uses a configurable stopword list as the only language-specific resource
- Avoids dependency on POS taggers, parsers, or pretrained embeddings
- Works effectively on languages with available stopword lists, including English, Spanish, French, German, Italian, and many others
- The statistical features (casing, position, frequency) are language-agnostic
This makes YAKE suitable for multilingual document processing pipelines where maintaining language-specific NLP toolchains would be impractical.
Deduplication and Ranking
After scoring all candidate n-grams, YAKE applies a deduplication algorithm to remove redundant overlapping phrases:
- If a longer phrase and its sub-phrase both appear as candidates, the algorithm compares their scores
- The higher-scoring variant is retained while the lower-scoring duplicate is eliminated
- This prevents both 'machine learning' and 'learning' from appearing in the final output when they represent the same concept
- Final keyphrases are ranked by their composite score in ascending order (lower is better)
The result is a clean, non-redundant list of the most salient keyphrases extracted from the document.
YAKE vs. Other Keyphrase Extraction Methods
A feature-level comparison of YAKE against other prominent unsupervised keyphrase extraction methods, highlighting architectural differences and operational characteristics.
| Feature | YAKE | TF-IDF | RAKE | TextRank |
|---|---|---|---|---|
External Corpus Required | ||||
Statistical Feature Basis | 5 features (casing, position, frequency, relatedness, sentence) | Term frequency × inverse document frequency | Word degree and frequency ratios | Graph centrality (PageRank) |
Stopword Handling | Used as boundary delimiters and scored | Filtered out entirely | Used as boundary delimiters | Filtered out or retained as nodes |
Candidate Generation Method | Sliding window n-grams (up to 3-grams) | Individual unigrams only | Stopword-delimited contiguous sequences | POS-filtered noun phrase chunks |
Language Independence | ||||
Processing Speed (relative) | Fast (single-pass statistics) | Moderate (requires corpus-wide IDF) | Fast (linear scan) | Slow (iterative graph convergence) |
Output Granularity | Unigrams, bigrams, trigrams | Unigrams only | Variable-length phrases | Variable-length phrases |
Deduplication Strategy | Levenshtein similarity threshold | None (individual terms) | None (overlapping phrases retained) | Post-hoc redundancy removal |
Frequently Asked Questions
Explore the mechanics and applications of YAKE, a lightweight unsupervised algorithm for extracting meaningful keyphrases from individual documents without external corpora.
YAKE (Yet Another Keyword Extractor) is a lightweight, unsupervised keyphrase extraction algorithm that identifies salient terms from a single document without relying on external corpora or pre-trained models. It operates by extracting candidate n-grams and scoring them using five distinct statistical features derived purely from the input text. These features include casing (capitalization bias), word position (positional relevance), word frequency (normalized term frequency), word relatedness to context (co-occurrence dispersion), and word different sentence (sentence frequency). The final score for each candidate is calculated by multiplying these features together, with lower scores indicating higher relevance. This self-contained approach makes YAKE highly portable and domain-agnostic, as it does not require a training phase or a reference corpus to compute inverse document frequencies.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the algorithms and concepts that form the foundation of modern unsupervised keyphrase extraction, contrasting statistical, graph-based, and embedding-driven approaches.
TF-IDF
The foundational statistical measure for keyword importance. It calculates a term's weight by multiplying Term Frequency (how often a word appears in a document) by Inverse Document Frequency (how rare it is across a corpus). Unlike YAKE, TF-IDF requires a background corpus to compute IDF, making it less suitable for single-document extraction. It excels at identifying discriminative single words but often fails to capture multi-word phrases without additional n-gram heuristics.
RAKE
An unsupervised, domain-independent algorithm that extracts keyphrases by analyzing word co-occurrence. It splits text at stopwords to generate candidate phrases, then scores them based on the degree and frequency of constituent word co-occurrences within a graph. Like YAKE, it operates on a single document without external corpora, but relies solely on graph centrality rather than YAKE's multi-feature statistical model.
TextRank
A graph-based ranking algorithm adapted from Google's PageRank. It builds a word co-occurrence network where nodes are lexical units and edges represent co-occurrence within a window. The algorithm iteratively scores nodes until convergence, selecting the highest-ranked as keyphrases. Unlike YAKE's statistical feature approach, TextRank relies purely on the structural properties of the text graph and requires no labeled training data.
KeyBERT
A method leveraging BERT embeddings to extract keyphrases by measuring cosine similarity between candidate phrases and the full document embedding. It represents a shift from statistical features to dense semantic representations. While YAKE uses surface-level features like casing and position, KeyBERT captures deeper contextual meaning, often producing more semantically coherent phrases at the cost of higher computational requirements.
Maximal Marginal Relevance (MMR)
A re-ranking algorithm that balances a phrase's relevance to the document against its redundancy with already selected keyphrases. Often used as a post-processing step after YAKE or other extractors to diversify results. MMR prevents the top-K list from being dominated by semantically identical phrases, ensuring broader topical coverage in the final keyphrase set.
Candidate Scoring
The core process of assigning numerical weights to potential keyphrases. YAKE's scoring model uniquely combines five statistical features: casing (capitalization signals importance), position (early occurrence boosts weight), frequency (normalized term count), relatedness to context (co-occurrence with frequent terms), and sentence frequency (how often a term appears across different sentences). This multi-feature ensemble distinguishes it from simpler frequency-based methods.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us