No commit activity in last 3 years
No release in over 3 years
Deinflect (unconjugate/undecline) Japanese words.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
 Project Readme

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.