Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
plugin to extract keywords and key-phrases
| Date | Stars |
|---|---|
| 2026-07-24 | 340 |
| 2026-07-25 | 340 |
| 2026-07-28 | 340 |
| 2026-07-30 | 340 |
| 2026-08-06 | 340 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# retext-keywords
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
**[retext][]** plugin to extract keywords and key phrases.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(retextKeywords[, options])`](#unifieduseretextkeywords-options)
* [`Keyphrase`](#keyphrase)
* [`Keyword`](#keyword)
* [`Options`](#options)
* [`PhraseMatch`](#phrasematch)
* [`WordMatch`](#wordmatch)
* [Types](#types)
* [Compatibility](#compatibility)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package is a [unified][] ([retext][]) plugin to extract keywords and key
phrases from a document, and exposes that metadata on the [file][vfile].
## When should I use this?
You can use this plugin any time you’re dealing with unified or retext already,
and are interested in keywords and key phrases.
Importantly, keywords extraction in NLP is a rather heavy and sometimes fragile
process, so you might be better off manually providing a list of keywords.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install retext-keywords
```
In Deno with [`esm.sh`][esmsh]:
```js
import retextKeywords from 'https://esm.sh/retext-keywords@8'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import retextKeywords from 'https://esm.sh/retext-keywords@8?bundle'
</script>
```
## Use
Say our document `example.txt` contains (from [Wikipedia][term-extraction]):
```txt
Terminology mining, term extraction, term recognition, or glossary extraction, is a subtask of information extraction. The goal of terminology extraction is to automatically extract relevant terms from a given corpus.
In the semantic web era, a growing number of communities and networked enterprises started to access and interoperate through the internet. Modeling these communities and their information needs is important for several web applications, like topic-driven web crawlers, web services, recommender systems, etc. The development of terminology extraction is essential to the language industry.
One of the first steps to model the knowledge domain of a virtual community is to collect a vocabulary of domain-relevant terms, constituting the linguistic surface manifestation of domain concepts. Several methods to automatically extract technical terms from domain-specific document warehouses have been described in the literature.
Typically, approaches to automatic term extraction make use of linguistic processors (part of speech tagging, phrase chunking) to extract terminological candidates, i.e. syntactically plausible terminological noun phrases, NPs (e.g. compounds "credit card", adjective-NPs "local tourist information office", and prepositional-NPs "board of directors" - in English, the first two constructs are the most frequent). Terminological entries are then filtered from the candidate list using statistical and machine learning methods. Once filtered, because of their low ambiguity and high specificity, these terms are particularly useful for conceptualizing a knowledge domain or for supporting the creation of a domain ontology. Furthermore, terminology extraction is a very useful starting point for semantic similarity, knowledge management, human translation and machine translation, etc.
```
…and our module `example.js` contains:
```js
import {toString} from 'nlcst-to-string'
import {retext} from 'retext'
import retextKeywords from 'retext-keywords'
import retextPos from 'retext-pos'
import {read} from 'to-vfile'
const file = await retext()
.use(retextPos) // Make sure to use `retext-pos` before `retext-keywords`.
.use(retextKeywords)
.process(await read('Excerpt of 9,506 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:990e20251c7024d0, topic:tensorflow