このページの内容

Awesome NLP with Ruby

NLP with Rubyを扱う資料や関連プロジェクトをまとめたAwesomeリストです。

目次

:sparkles: チュートリアル

この節の充実にご協力ください! :smiley:

NLPパイプラインのサブタスク

NLPパイプラインはプレーンテキストから始まります。

パイプライン生成

  • composable_operations - Definition framework for operation pipelines.
  • ruby-spark - Spark bindings with an easy to understand DSL.
  • phobos - Apache Kafka向けのRuby用簡易クライアント.
  • parallel - Supervisor for parallel execution on multiple CPUs or in many threads.
  • pwrake - Rake extensions to run local and remote tasks in parallel.

多目的エンジン

オンラインAPI

  • alchemyapi_ruby - Legacy Ruby SDK for AlchemyAPI/Bluemix.
  • wit-ruby - Wit.ai言語理解プラットフォーム向けのRubyクライアントライブラリ.
  • wlapi - オンラインAPIに関するRubyライブラリ、ツール、資料です。 オンラインAPIに関するRubyライブラリ、ツール、資料です。 Wortschatz Leipzig
  • monkeylearn-ruby - オンラインAPIに関するRubyライブラリ、ツール、資料です。 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パイプラインにおける最初の重要工程の一つです。

  • scylla - Language Categorization and Identification.

分割

トークン化、単語・文境界の検出と曖昧性解消を行うツールです。

  • 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.
  • punkt-segmenter - Pure Ruby implementation of the Punkt Segmenter.
  • tactful_tokenizer - RegExp based tokenizer for different languages.
  • scapel - Sentence Boundary Disambiguation tool.

語彙処理

ステミング

ステミングとは、情報検索において語形を何らかの基本表現へ縮約する処理を指します。 stemsは必ずしも言語学的な根拠を持たないため、見出し語化とは 区別する必要があります。

  • ruby-stemmer - Ruby-Stemmer exposes the SnowBall API to Ruby.
  • uea-stemmer - Conservative stemmer for search and indexing.

見出し語化

Lemmatization is considered a process of finding a base form of a word. Lemmas are often collected in dictionaries.

  • lemmatizer - WordNet based Lemmatizer for English texts.

語彙統計: タイプとトークンの計数

  • wc - Facilities to count word occurrences in a text.
  • word_count - StringおよびHashオブジェクト用の単語カウンタ.
  • words_counted - Pure Ruby library counting word statistics with different custom options.

ストップワードの除去

  • stopwords-filter - ストップワードの除去に関するRubyライブラリ、ツール、資料です。 Stop Word Lexicon based on the SnowBall lemmatizer.

句レベル処理

  • n_gram - N-Gram generator.
  • ruby-ngram - Break words and phrases into ngrams.
  • raingrams - Flexible and general-purpose ngrams library written in pure Ruby.

統語処理

句構造解析

意味解析

  • 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.

語用論解析

高水準タスク

綴り・誤り訂正

テキストアラインメント

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

機械翻訳

  • 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.
  • zipf - implementation of BLEU and other base algorithms.

感情分析

数値・日付・時刻の解析

  • chronic - Pure Ruby natural language date parser.
  • 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.

固有表現認識

  • ruby-ner - Named Entity Recognition with Stanford NER and Ruby.
  • ruby-nlp - Ruby Binding for Stanford Pos-Tagger and Name Entity Recognizer.

音声合成・音声認識

  • 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.

対話エージェント・アシスタント・チャットボット

  • chatterbot - Straightforward ruby-based Twitter Bot Framework, using OAuth to authenticate.
  • lita - persistent storageを用いた、高度に拡張可能なチャット操作ボットフレームワーク(Redisで構築)。

言語資源

機械学習ライブラリ

機械学習ライブラリに関するRubyライブラリ、ツール、資料です。 Machine Learning in pure Ruby or written in other programming languages with appropriate bindings for Ruby.

より新しい情報はAwesome ML with Rubyを参照してください。

  • rb-libsvm - Support Vector Machines with Ruby.
  • weka - JRuby bindings for Weka, different ML algorithms implemented through Weka.
  • decisiontree - Decision Tree ID3 Algorithm in pure Ruby [post].
  • rtimbl - Memory based learners from the Timbl framework.
  • classifier-reborn - General classifier module to allow Bayesian and other types of classifications.
  • lda-ruby - RubyによるLDA(潜在ディリクレ分配)の実装(自動トピックモデル化およびドキュメントクラスタリング)。
  • liblinear-ruby-swig - Ruby interface to LIBLINEAR (much more efficient than LIBSVM for text classification).
  • linnaeus - Redis-backed Bayesian classifier.
  • maxent_string_classifier - JRuby maximum entropy classifier for string data, based on the OpenNLP Maxent framework.
  • naive_bayes - Simple Naive Bayes classifier.
  • nbayes - Full-featured, Ruby implementation of Naive Bayes.
  • omnicat - Generalized rack framework for text classifications.
  • omnicat-bayes - Naive Bayes text classification implementation as an OmniCat classifier strategy.
  • ruby-fann - Fast Artificial Neural Network Library (FANN)へのRubyバインディング。
  • rblearn - 特徴量抽出および交差検証ライブラリ。

データ可視化

データ可視化に関するRubyライブラリ、ツール、資料です。 データ可視化 section on the Data Science with Ruby list.

光学文字認識

テキスト抽出

  • yomu - ファイルおよびドキュメントからテキストとメタデータを抽出するための Apache Tika コンテンツ分析ツールキットのライブラリ

全文検索・情報検索・索引付け

言語対応の文字列操作

Libraries for language aware string manipulation, i.e. search, pattern matching, case conversion, transcoding, regular expressions which need information about the underlying language.

  • fuzzy_match - Fuzzy string comparison with Distance measures and Regular Expression.
  • fuzzy-string-match - Fuzzy string matching library for Ruby.
  • active_support - RoR の ActiveSupport ゲームには、ケースを扱うためのさまざまな文字列拡張機能が含まれる
  • 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 — ルシアン文字をラテン文字にさまざまな方法で変換(reference implementation が定義する方法)

記事・投稿・講演・発表

プロジェクトとコード例

書籍

  • 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]
  • Watson, Mark. Practical Semantic Web and Linked Data Applications. Lulu, 2010. [link]

コミュニティ

協力募集中!

この節のプロジェクトはコミュニティにとって重要ですが、より多くの協力を必要としています。時間を確保できる場合は、開発への参加をご検討ください。

関連リソース

ライセンス

Creative Commons Zero 1.0 Awesome NLP with Ruby by Andrei Beliankou and Contributors.

法令で認められる範囲において、CC0を適用した人物は Awesome NLP with Rubyに関するすべての著作権および関連・隣接する権利を Awesome NLP with Rubyから放棄しています。

本作品にはCC0の法的文書が同梱されている必要があります。 同梱されていない場合はhttps://creativecommons.org/publicdomain/zero/1.0/を参照してください。