Skip to content
50

Awesome NLP with Ruby

Curated List: Practical Natural Language Processing done in Ruby

1.1k stars72 forks127 entriesLast push Jun 27, 2023 (3 years ago)License CC0-1.0

This page lists names, links and short descriptions. The original list on GitHub is the source and belongs to its authors.

NLP Pipeline Subtasks >Pipeline Generation

composable_operations

Definition framework for operation pipelines.

ruby-spark

Spark bindings with an easy to understand DSL.

phobos

Simplified Ruby Client for Apache Kafka.

parallel

Supervisor for parallel execution on multiple CPUs or in many threads.

In 4 listsDetails

pwrake

Rake extensions to run local and remote tasks in parallel.

In 2 lists

NLP Pipeline Subtasks >Multipurpose Engines

open-nlp

Ruby Bindings for the OpenNLP Toolkit.

stanford-core-nlp

Ruby Bindings for the Stanford CoreNLP tools.

treat

Natural Language Processing framework for Ruby (like NLTK for Python).

In 4 listsDetails

nlp_toolz

Wrapper over some OpenNLP classes and the original Berkeley Parser.

open_nlp

JRuby Bindings for the OpenNLP Toolkit.

ruby-spacy

Wrapper module for spaCy NLP library via PyCall.

alchemyapi_ruby

Legacy Ruby SDK for AlchemyAPI/Bluemix.

wit-ruby

Ruby client library for the Wit.ai Language Understanding Platform.

wlapi

Ruby client library for Wortschatz Leipzig web services.

monkeylearn-ruby

Sentiment Analysis, Topic Modelling, Language Detection, Named Entity Recognition via a Ruby based Web API client.

google-cloud-language

Google's Natural Language service API for Ruby.

NLP Pipeline Subtasks >Language Identification

scylla

Language Categorization and Identification.

NLP Pipeline Subtasks >Segmentation

tokenizer

Simple multilingual tokenizer. [tutorial]

pragmatic_tokenizer

Multilingual tokenizer to split a string into tokens.

nlp-pure

Natural language processing algorithms implemented in pure Ruby with minimal dependencies.

textoken

Simple and customizable text tokenization library.

pragmatic_segmenter

Word Boundary Disambiguation with many cookies.

In 2 lists

punkt-segmenter

Pure Ruby implementation of the Punkt Segmenter.

tactful_tokenizer

RegExp based tokenizer for different languages.

scapel

Sentence Boundary Disambiguation tool.

NLP Pipeline Subtasks >Lexical Processing

ruby-stemmer

Ruby-Stemmer exposes the SnowBall API to Ruby.

In 3 lists

uea-stemmer

Conservative stemmer for search and indexing.

In 2 lists

lemmatizer

WordNet based Lemmatizer for English texts.

wc

Facilities to count word occurrences in a text.

word_count

Word counter for String and Hash objects.

words_counted

Pure Ruby library counting word statistics with different custom options.

In 2 lists

stopwords-filter

Filter and Stop Word Lexicon based on the SnowBall lemmatizer.

NLP Pipeline Subtasks >Phrasal Level Processing

n_gram

N-Gram generator.

ruby-ngram

Break words and phrases into ngrams.

raingrams

Flexible and general-purpose ngrams library written in pure Ruby.

NLP Pipeline Subtasks >Syntactic Processing

stanfordparser

Ruby based wrapper for the Stanford Parser.

rley

Pure Ruby implementation of the Earley Parsing Algorithm for Context-Free Constituency Grammars.

rsyntaxtree

Visualization for syntactic trees in Ruby based on RMagick. [dep: ImageMagick]

NLP Pipeline Subtasks >Semantic Analysis

amatch

Set of five distance types between strings (including Levenshtein, Sellers, Jaro-Winkler, 'pair distance').

damerau-levenshtein

Calculates edit distance using the Damerau-Levenshtein algorithm.

hotwater

Fast Ruby FFI string edit distance algorithms.

levenshtein-ffi

Fast string edit distance computation, using the Damerau-Levenshtein algorithm.

tf_idf

Term Frequency / Inverse Document Frequency in pure Ruby.

tf-idf-similarity

Calculate the similarity between texts using TF/IDF.

NLP Pipeline Subtasks >Pragmatical Analysis

SentimentLib

Simple extensible sentiment analysis gem.

High Level Tasks >Spelling and Error Correction

gingerice

Spelling and Grammar corrections via the Ginger API.

hunspell-i18n

Ruby bindings to the standard Hunspell Spell Checker.

ffi-hunspell

FFI based Ruby bindings for Hunspell.

hunspell

Ruby bindings to Hunspell via Ruby C API.

High Level Tasks >Text Alignment

alignment

Alignment routines for bilingual texts (Gale-Church implementation).

High Level Tasks >Machine Translation

google-api-client

Google API Ruby Client.

microsoft_translator

Ruby client for the microsoft translator API.

termit

Google Translate with speech synthesis in your terminal.

In 2 lists

zipf

implementation of BLEU and other base algorithms.

High Level Tasks >Sentiment Analysis

stimmung

Semantic Polarity based on the SentiWS lexicon.

High Level Tasks >Numbers, Dates, and Time Parsing

chronic

Pure Ruby natural language date parser.

In 2 lists

chronic_between

Simple Ruby natural language parser for date and time ranges.

chronic_duration

Pure Ruby parser for elapsed time.

kronic

Methods for parsing and formatting human readable dates.

nickel

Extracts date, time, and message information from naturally worded text.

tickle

Parser for recurring and repeating events.

numerizer

Ruby parser for English number expressions.

High Level Tasks >Named Entity Recognition

ruby-ner

Named Entity Recognition with Stanford NER and Ruby.

ruby-nlp

Ruby Binding for Stanford Pos-Tagger and Name Entity Recognizer.

High Level Tasks >Text-to-Speech-to-Text

espeak-ruby

Small Ruby API for utilizing 'espeak' and 'lame' to create text-to-speech mp3 files.

tts

Text-to-Speech conversion using the Google translate service.

att_speech

Ruby wrapper over the AT&T Speech API for speech to text.

pocketsphinx-ruby

Pocketsphinx bindings.

In 2 lists

Dialog Agents, Assistants, and Chatbots

chatterbot

Straightforward ruby-based Twitter Bot Framework, using OAuth to authenticate.

lita

Highly extensible chat operation bot framework written with persistent storage on Redis.

Linguistic Resources

rwordnet

Pure Ruby self contained API library for the Princeton WordNet®.

wordnet

Performance tuned bindings for the Princeton WordNet®.

Machine Learning Libraries

Machine Learning

Algorithms in pure Ruby or written in other programming languages with appropriate bindings for Ruby.

In 3 lists

rb-libsvm

Support Vector Machines with Ruby.

In 4 listsDetails

weka

JRuby bindings for Weka, different ML algorithms implemented through Weka.

In 3 lists

decisiontree

Decision Tree ID3 Algorithm in pure Ruby [post].

In 3 lists

rtimbl

Memory based learners from the Timbl framework.

In 2 lists

classifier-reborn

General classifier module to allow Bayesian and other types of classifications.

In 3 lists

lda-ruby

Ruby implementation of the LDA (Latent Dirichlet Allocation) for automatic Topic Modelling and Document Clustering.

In 2 lists

liblinear-ruby-swig

Ruby interface to LIBLINEAR (much more efficient than LIBSVM for text classification).

In 2 lists

linnaeus

Redis-backed Bayesian classifier.

In 2 lists

maxent_string_classifier

JRuby maximum entropy classifier for string data, based on the OpenNLP Maxent framework.

In 2 lists

naive_bayes

Simple Naive Bayes classifier.

In 2 lists

nbayes

Full-featured, Ruby implementation of Naive Bayes.

In 2 lists

omnicat

Generalized rack framework for text classifications.

In 2 lists

omnicat-bayes

Naive Bayes text classification implementation as an OmniCat classifier strategy.

In 2 lists

ruby-fann

Ruby bindings to the Fast Artificial Neural Network Library (FANN).

In 3 lists

rblearn

Feature Extraction and Crossvalidation library.

In 2 lists

Optical Character Recognition

tesseract-ocr

FFI based wrapper over the Tesseract OCR Engine.

Text Extraction

yomu

library for extracting text and metadata from files and documents using the Apache Tika content analysis toolkit.

Full Text Search, Information Retrieval, Indexing

rsolr

Ruby and Rails client library for Apache Solr.

sunspot

Rails centric client for Apache Solr.

In 3 lists

thinking-sphinx

Active Record plugin for using Sphinx in (not only) Rails based projects.

In 4 listsDetails

elasticsearch

Ruby client and API for Elasticsearch.

In 3 lists

elasticsearch-rails

Ruby and Rails integrations for Elasticsearch.

In 2 lists

google-api-client

Google API Ruby Client.

Language Aware String Manipulation

fuzzy_match

Fuzzy string comparison with Distance measures and Regular Expression.

fuzzy-string-match

Fuzzy string matching library for Ruby.

active_support

RoR ActiveSupport gem has various string extensions that can handle case.

In 8 listsDetails

fuzzy_tools

Toolset for fuzzy searches in Ruby tuned for accuracy.

u

U extends Ruby’s Unicode support.

unicode

Unicode normalization library.

CommonRegexRuby

Find a lot of kinds of common information in a string.

regexp-examples

Generate strings that match a given regular expression.

verbal_expressions

Make difficult regular expressions easy.

translit_kit

Transliterate Hebrew & Yiddish text into Latin characters.

re2

hight-speed Regular Expression library for Text Mining and Text Extraction.

regex_sample

sample string generation from a given Regular Expression.

iuliia

transliteration Cyrillic to Latin in many possible ways (defined by the reference implementation).

Projects and Code Examples

Going the Distance

Implementations of various distance algorithms with example calculations.

ruby-ner

Named Entity Recognition with Stanford NER and Ruby.

Words Counted

examples of customizable word statistics powered by words_counted.

RSyntaxTree

Web based demonstration of the syntactic tree visualization.

Books

Miller, Rob

. Text Processing with Ruby: Extract Value from the Data That Surrounds You. Pragmatic Programmers, 2015. [link]

Watson, Mark

. Scripting Intelligence: Web 3.0 Information Gathering and Processing. APRESS, 2010. [link]

Community

Reddit

Stack Overflow

Twitter

Needs your Help!

ferret

Information Retrieval in C and Ruby.

summarize

Ruby native wrapper for Open Text Summarizer.

Neural Machine Translation Implementations

Awesome Ruby

Among other awesome items a short list of NLP related projects.

In 7 listsDetails

Ruby NLP

State-of-Art collection of Ruby libraries for NLP.

In 4 listsDetails

Speech and Natural Language Processing

General List of NLP related resources (mostly not for Ruby programmers).

In 5 listsDetails

Scientific Ruby

Linear Algebra, Visualization and Scientific Computing for Ruby.

In 3 lists

iRuby

IRuby kernel for Jupyter (formelly IPython).

In 3 lists

Awesome OCR

Multitude of OCR (Optical Character Recognition) resources.

In 4 lists

Awesome TensorFlow

Machine Learning with TensorFlow libraries.

In 7 listsDetails

ImageMagick

Use ImageMagick to create, edit, compose, or convert bitmap images

In 2 lists
See category
94

Awesome Rust

rust-unofficial/awesome-rust

A curated list of Rust code and resources.

Fresh★ 60k1833 entriesPushed today
94

Table of Contents

hesreallyhim/awesome-claude-code

A hand-picked collection of the finest of resources for the most awesome of agents, Claude Code, the undisputed champion of coding companions, from the unstoppable team…

Fresh★ 55k202 entriesPushed today
94

Awesome Mac

jaywcjlove/awesome-mac

 This project is dedicated to collecting high-quality macOS software and organizing them systematically by different categories for easy search and use.

Fresh★ 115k1316 entriesPushed today
94

Awesome Python

vinta/awesome-python

Curated Python frameworks, libraries and resources.

Fresh★ 324k504 entriesPushed today
94

Awesome Agent Skills

VoltAgent/awesome-agent-skills

A curated collection of 1000+ agent skills from official dev teams and the community, compatible with Claude Code, Codex, Gemini CLI, Cursor, and more.

Fresh★ 35k839 entriesPushed today
94

Awesome C++

fffaraz/awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Fresh★ 74k1358 entriesPushed yesterday