Skip to content
Gem for unconjugating/undeclining Japanese words.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
japanese_deinflector.gemspec

README.md

Deinflect Japanese words. Ruby 1.9 or higher required.

Build Status

Install

gem install japanese_deinflector or add japanese_deinflector to your Gemfile.

Usage

jd = JapaneseDeinflector.new
jd.deinflect("嬉しくありません")

This method returns an array of weighted possible deinflections. Weight is a float between 0 and 1, where a weight of 1 is highly likely to be the correct deinflection, and a weight of 0 is highly unlikely:

[
  {:weight=>0.75, :word=>"嬉しい", :reason=>"polite negative"},
  {:weight=>0.5, :word=>"嬉しくある", :reason=>"polite negative"},
  {:weight=>0.375, :word=>"嬉しくありる", :reason=>"polite negative"}
]

Input text should be UTF-8 encoded.

Something went wrong with that request. Please try again.