Yake.NET 1.0.0

dotnet add package Yake.NET --version 1.0.0
                    
NuGet\Install-Package Yake.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yake.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yake.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Yake.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Yake.NET --version 1.0.0
                    
#r "nuget: Yake.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Yake.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Yake.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Yake.NET&version=1.0.0
                    
Install as a Cake Tool

Yake.NET

A pure C# implementation of YAKE (Yet Another Keyword Extractor) — an unsupervised, lightweight, and language-agnostic keyword extraction algorithm for single documents.

Lower score = more relevant keyword.


Features

  • ✅ No external dependencies — 100% pure C#
  • ✅ Unsupervised — no training data or models needed
  • ✅ Language-agnostic — works with any language when paired with custom stopwords
  • ✅ N-gram support — extracts single words and multi-word keyphrases
  • ✅ Built-in English stopwords
  • ✅ Deduplication of near-duplicate candidates
  • ✅ Fully configurable via YakeOptions
  • ✅ .NET 10

Installation

dotnet add package Yake.NET

Quick Start

using Yake.NET;

var extractor = new YakeExtractor();
var keywords = extractor.Extract("Your document text goes here...");

foreach (var kw in keywords)
    Console.WriteLine(kw); // e.g. "keyword extraction (score: 0.001234)"

Configuration

var extractor = new YakeExtractor(new YakeOptions
{
    MaxNGramSize          = 3,    // include up to trigrams
    TopN                  = 10,   // return top 10 keywords
    DeduplicationThreshold = 0.9, // similarity threshold for dedup (0–1)
    WindowSize            = 2,    // co-occurrence window
    Stopwords             = null  // null = use built-in English list
});

Custom Stopwords

// Extend the built-in English stopwords
var customStopwords = StopwordsEn.Words.Concat(["custom", "words"]);

var extractor = new YakeExtractor(new YakeOptions
{
    Stopwords = customStopwords
});

How YAKE Works

YAKE scores each candidate keyword using 5 statistical features:

Feature Description
T_Casing Ratio of capitalised (non-sentence-start) occurrences
T_Position Inverse log of the sentence where the word first appears
T_Frequency Normalised term frequency
T_Relatedness Diversity of co-occurring words relative to frequency
T_DifferentSentence Fraction of sentences containing the word

The final score formula for n-grams:

score(candidate) = ∏(word_scores) / (n × (n + Σ word_scores))

API Reference

YakeExtractor

Member Description
YakeExtractor() Creates extractor with default English options
YakeExtractor(YakeOptions) Creates extractor with custom options
IReadOnlyList<KeywordResult> Extract(string text) Extracts keywords from text

KeywordResult

Property Type Description
Keyword string The extracted keyword or keyphrase
Score double YAKE score (lower = more relevant)

YakeOptions

Property Default Description
MaxNGramSize 3 Maximum n-gram length
TopN 10 Number of keywords to return
DeduplicationThreshold 0.9 Similarity cutoff for deduplication
WindowSize 2 Co-occurrence context window size
Stopwords null Custom stopwords (null = English built-ins)

References

  • Campos, R., Mangaravite, V., Pasquali, A., Jorge, A., Nunes, C., & Jatowt, A. (2020). YAKE! Keyword extraction from single documents using multiple local features. Information Sciences, 509, 257–289.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 119 2/22/2026