• Stars
    star
    388
  • Rank 110,734 (Top 3 %)
  • Language
    JavaScript
  • Created almost 13 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

A simple natural language tool written for NodeJS

SpeakEasy

Simple Natural Language Processing

Circle CI


npm install speakeasy-nlp


Current commands:

  1. *.classify : Roughly determines the action, subject, and owner (posessive object) of a sentence. As of 0.2.2 it also includes verbs, nouns, and adjectives
  2. *.sentiment: A collection of methods to approximate the positive/negative affect of a statement (relative to the whole statement)
  3. *.closest : Uses levenshtein distance to find the best match for a word given an array

var speak = require("./speakeasy-nlp");

// Analyze sentences at a basic level
// ------------------------------------- //
speak.classify("What is your name?")             //=> { action: "what", owner: "listener", subject: "name" }
speak.classify("Do you know what time it is?")   //=> { action: "what", owner: "it", subject: "time" }

// Sentiment analysis
// ------------------------------------- //
speak.sentiment.negativity("I hate your guts")   //=> { score: 1, words: [hate] }
speak.sentiment.positivity("I love you")         //=> { score: 1, words: [love] }

speak.sentiment.analyze("I love you, but you smell something aweful")  
// (Negative scores dictate a stronger influence of negative words)
//=> { score: -1, positive: { ... }, negative: { ... } }

// Closest word
// ------------------------------------- //
speak.closest("node", ["foo", "nodejs", "baz"])     //=> "nodejs"

Philosophy

The goal of this project is not to be the next final solution for natural language processing. There are plenty of other projects that do a significantly better job of this. SpeakEasy spawned out of another of my projects, Nodebot, as a method of processing user input to simulate the illusion of intelligence.

SpeakEasy's goal is to provide a library for NodeJS to perform simple language processing actions that perform well for 70%-80% of all cases.

License

speakeasy is released under the MIT License.

More Repositories

1

nodebot

A helper robot written in node javascript
JavaScript
74
star
2

backbone-socket.io-examples

A collection of example apps using Backbone and Socket.IO
JavaScript
24
star
3

phantomjs_ga

Testing Google Analytics with PhantomJS
JavaScript
13
star
4

jquery-flicker

Adds a broken lightbulb style flickering effect to any DOM element.
JavaScript
11
star
5

emacs-laravel-plus-theme

The paste.laravel.com theme plus some preferential modifications.
Emacs Lisp
9
star
6

magento-cookbook

A set of recipes and mantras for Magento (Because *someone* needs to)
8
star
7

react-fun

React Fun
JavaScript
8
star
8

twittermap

Geographically plotted tweets, with sentiment analysis!
JavaScript
6
star
9

react-animatable

JavaScript
5
star
10

jest-electron-environment

Proof of concept Electron runner for Jest.
JavaScript
5
star
11

yappy-bird

Sound enabled flappy-bird
JavaScript
4
star
12

sonos-web

A simple Sonos Web controller
JavaScript
4
star
13

ex-alchemist-mode

A presentation on alchemist mode I gave at some point.
Elixir
3
star
14

twitter-madlibs

Madlibs for Twitter!
JavaScript
3
star
15

react-inputs

My react input talk
CSS
2
star
16

react-issue-reproducer

HTML
2
star
17

tilekit

WARNING: Not ready for public consumption
JavaScript
2
star
18

chrome-os

Setup files for ChromeOS
Emacs Lisp
2
star
19

student-loan-visualization

WIP. Visualization of student loans for 2013-14.
Ruby
2
star
20

messy-sound-stuff

Such fun
JavaScript
2
star
21

twilight-theme

An Emacs 24 Twilight Theme (Yet another...)
Emacs Lisp
2
star
22

spacegray-emacs

Emacs Lisp
2
star
23

make-starter

Make for the front-end! I'm only 85% serious!
JavaScript
1
star
24

pocketbook

JavaScript
1
star
25

learning-clojure

A place for my files associated with learning clojure
Clojure
1
star
26

emacs-ectoplasm-theme

A dark, ghostly emacs theme
Emacs Lisp
1
star
27

generative-art-fun

JavaScript
1
star
28

learn-backbone

A collection for my blog backbone examples
JavaScript
1
star
29

nightwatch-test

JavaScript
1
star
30

react-native-talk-demos

Demos for my React native talk
JavaScript
1
star
31

emacs-unsplash-themes

A collection of unsplash wallpapers with contrasting Emacs themes.
Emacs Lisp
1
star
32

calcbot-to-css

I love the UI for CalcBot App by Tapbots, and wanted to see if I could transition the UI. Here it is.
Ruby
1
star
33

advent-of-code

Clojure
1
star
34

beasts

JavaScript
1
star
35

webpack-boilerplate

A quick one-off repo for webpack boilerplate with react
JavaScript
1
star