Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Natural Language Processing in Ruby [closed]

I'm looking to do some sentence analysis (mostly for twitter apps) and infer some general characteristics. Are there any good natural language processing libraries for this sort of thing in Ruby?

Similar to Is there a good natural language processing library but for Ruby. I'd prefer something very general, but any leads are appreciated!

like image 228
Joey Robert Avatar asked Jun 16 '09 02:06

Joey Robert


People also ask

Is natural language processing still relevant?

Even though NLP has grown significantly since its humble beginnings, industry experts say that its implementation still remains one of the biggest big data challenges of 2021.

What is natural language processing with example?

Natural language processing (NLP) describes the interaction between human language and computers. It's a technology that many people use daily and has been around for years, but is often taken for granted. A few examples of NLP that people use every day are: Spell check. Autocomplete.

Which library used for natural language processing?

Scikit-Learn It is a great open so natural language processing library and most used among data scientists for NLP tasks. It provides a large number of algorithms to build machine learning models.

How does natural processing language work?

In natural language processing, human language is separated into fragments so that the grammatical structure of sentences and the meaning of words can be analyzed and understood in context. This helps computers read and understand spoken or written text in the same way as humans.


1 Answers

Three excellent and mature NLP packages are Stanford Core NLP, Open NLP and LingPipe. There are Ruby bindings to the Stanford Core NLP tools (GPL license) as well as the OpenNLP tools (Apache License).

On the more experimental side of things, I maintain a Text Retrieval, Extraction and Annotation Toolkit (Treat), released under the GPL, that provides a common API for almost every NLP-related gem that exists for Ruby. The following list of Treat's features can also serve as a good reference in terms of stable natural language processing gems compatible with Ruby 1.9.

  • Text segmenters and tokenizers (punkt-segmenter, tactful_tokenizer, srx-english, scalpel)
  • Natural language parsers for English, French and German and named entity extraction for English (stanford-core-nlp).
  • Word inflection and conjugation (linguistics), stemming (ruby-stemmer, uea-stemmer, lingua, etc.)
  • WordNet interface (rwordnet), POS taggers (rbtagger, engtagger, etc.)
  • Language (whatlanguage), date/time (chronic, kronic, nickel), keyword (lda-ruby) extraction.
  • Text retrieval with indexation and full-text search (ferret).
  • Named entity extraction (stanford-core-nlp).
  • Basic machine learning with decision trees (decisiontree), MLPs (ruby-fann), SVMs (rb-libsvm) and linear classification (tomz-liblinear-ruby-swig).
  • Text similarity metrics (levenshtein-ffi, fuzzy-string-match, tf-idf-similarity).

Not included in Treat, but relevant to NLP: hotwater (string distance algorithms), yomu (binders to Apache Tiki for reading .doc, .docx, .pages, .odt, .rtf, .pdf), graph-rank (an implementation of GraphRank).

like image 54
user2398029 Avatar answered Oct 08 '22 05:10

user2398029