Project

greeklish

0.01
No commit activity in last 3 years
No release in over 3 years
Configurable generator of Greek words to greeklish forms.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.1.0
 Project Readme

Greeklish

Generate greeklish forms from Greek words.

Installation

Add this line to your application's Gemfile:

gem 'greeklish'

And then execute:

$ bundle

Or install it yourself as:

$ gem install greeklish

Usage

Obtain an instance of GreeklishConverter as follows:

converter = Greeklish.converter(max_expansions: 2,
                                generate_greek_variants: false)

greeklish_words = converter.convert('ομπρελα') # => ["omprela", "obrela"]

The option max_expansions denotes the maximum greeklish expansions for each greek word, i.e:

converter = Greeklish.converter(max_expansions: 4,
                                generate_greek_variants: false)

converter.convert('αυτοκινητο') # =>
    ["autokinhto", "aftokinhto", "avtokinhto", "aytokinhto"]

The option generate_greek_variants denotes if greek variants should be generated, i.e:

converter = Greeklish.converter(max_expansions: 2,
                                generate_greek_variants: true)

converter.convert('αμαξι') # =>
    ["amaksi", "amaxi", "amaksiou", "amaxiou", "amaksia", "amaxia",
     "amaksiwn", "amaxiwn"]

Credits

Based on: elasticsearch-analysis-greeklish

Contributing

  1. Fork it ( https://github.com/[my-github-username]/greeklish/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request