View on GitHub

Freeling::Analyzer

A Ruby wrapper for FreeLing's analyzer tool

Download this project as a .zip file Download this project as a tar.gz file

Freeling::Analyzer

FreeLing::Analyzer is a Ruby wrapper around analyzer, a binary tool included in FreeLing's package that allows the user to process a stream of text with FreeLing.

This has been tested with version 3.0+ only.

Usage

text = "Mi amigo Juan Mesa se mesa la barba al lado de la mesa."
analyzer = FreeLing::Analyzer.new(text, :language => :es)

analyzer.tokens.first
# => #<FreeLing::Analyzer::Token form="Mi" lemma="mi" prob=0.995536 tag="DP1CSS">

analyzer.tokens.map { |t| t.lemma }
# => ["mi", "amigo", "juan_mesa", "se", "mesar", "el", "barba", "a+el", "lado", "de", "el", "mesa", "."]

Features

Installation

Add this line to your application's Gemfile:

gem 'freeling-analyzer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install freeling-analyzer

FreeLing

FreeLing is an open source suite of language analyzers written in C++.

The main services offered are:

Currently supported languages are:

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request