• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 13 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[UNMAINTAINED] Extract terms and keywords from a piece of text

glossary

glossary is a JavaScript module that extracts keywords from text (aka "term extraction" or "auto tagging"). It takes a string of text and returns an array of terms that are relevant to the content:

var glossary = require("glossary");

var keywords = glossary.extract("Her cake shop is the best in the business");

console.log(keywords)  // ["cake", "shop", "cake shop", "business"]

glossary is standalone and uses part-of-speech analysis to extract the relevant terms.

install

For node with npm:

npm install glossary

API

blacklisting

Use blacklist to remove unwanted terms from any extraction:

var glossary = require("glossary")({
   blacklist: ["library", "script", "api", "function"]
});

var keywords = glossary.extract("JavaScript color conversion library");

console.log(keywords); // ["color", "conversion"]

minimum frequency

Use minFreq to limit the terms to only those that occur with a certain frequency:

var glossary = require("glossary")({ minFreq: 2 });

var keywords = glossary.extract("Kasey's pears are the best pears in Canada");

console.log(keywords); // ["pears"]

sub-terms

Use collapse to remove terms that are sub-terms of other terms:

var glossary = require("glossary")({ collapse: true });

var keywords = glossary.extract("The Middle East crisis is getting worse");

console.log(keywords); // ["Middle East crisis"]

verbose output

Use verbose to also get the count of each term:

var glossary = require("glossary")({ verbose: true });

var keywords = glossary.extract("The pears from the farm are good");

console.log(keywords); // [ { word: 'pears', count: 1 }, { word: 'farm', count: 1 } ]

propers

glossary Uses jspos for POS tagging. It's inspired by the python module topia.termextract.

More Repositories

1

brain

Simple feed-forward neural network in JavaScript
JavaScript
8,006
star
2

kittydar

Face detection for cats in JavaScript - demo for TXJS 2012 talk
JavaScript
1,419
star
3

replace

Command line search and replace utility
JavaScript
748
star
4

classifier

Bayesian classifier with Redis backend
JavaScript
625
star
5

clustering

K-means and hierarchical clustering
JavaScript
498
star
6

nomnom

Option parser for node with generated usage and commands
JavaScript
470
star
7

hog-descriptor

[UNMAINTAINED] Histogram of Oriented Gradients (HOG) descriptor extractor
JavaScript
169
star
8

fxconsole

[UNMAINTAINED] Remote JavaScript console for Firefox
JavaScript
127
star
9

firefox-client

[UNMAINTAINED] Node.js remote debugging client for Firefox
JavaScript
100
star
10

costco

UI for bulk editing CouchDB docs
JavaScript
56
star
11

js-select

[UNMAINTAINED] Traverse and modify objects using JSONSelect selectors
JavaScript
56
star
12

rainbow

Color tools for Firefox
JavaScript
39
star
13

txjs-slides

dzslides deck for my txjs talk
CSS
14
star
14

mac-sounds

Play default OS X sounds from node
JavaScript
9
star
15

bzhome

Bugzilla dashboard
JavaScript
8
star
16

passion-project-slides

Slides for my Passion Projects talk on Machine Learning and JS
JavaScript
7
star
17

tcm

Mozilla's new testcase manager
JavaScript
5
star
18

detect-indent

CSS
5
star
19

searchbugs

Search for Bugzilla bugs by component
JavaScript
4
star
20

test-pages

Testcase websites for devtools
JavaScript
3
star
21

devtools-guide

3
star
22

showsearch

Jetpack that shows search terms in Firefox's awesomebar
JavaScript
3
star
23

firefontfamily

A Firebug extension that highlights the rendered font-family
JavaScript
2
star
24

contextfont

Firefox addon to find fonts on websites
JavaScript
2
star
25

celestial-snips-app

Snips voice assistant that answers celestial questions
Python
2
star
26

mini-devtools

mini in-content devtools
JavaScript
2
star
27

artfulimage

The Artful Image fine printing
2
star
28

bztweaks

mirror of Bugzilla Tweaks Firefox addon (https://bitbucket.org/ehsan/bugzilla-tweaks)
JavaScript
2
star
29

fluent-talk

JavaScript
1
star
30

bugidhelper

Bugzilla bug id linkifier and tooltipifier extension
JavaScript
1
star
31

brooklynjs-slides

Write your own in-content devtools with web APIs
CSS
1
star
32

test-snips-calc

Test Snips Calc Action
Python
1
star
33

harth

harth's no.de code
1
star
34

wwcode

A small website for Women Who Code SF
JavaScript
1
star
35

celestial-jupyter

Jupyter Notebook
1
star
36

test.js

Whatever's in my ~/test.js
JavaScript
1
star