0.0
No release in over 3 years
Low commit activity in last 3 years
This gem allows given 10 character phone number to convert into a word contained in a dictionary
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 10.0
~> 3.0
 Project Readme

Phone number to word

Gem Version Build Status Coverage Status Maintainability

Description

ph_no_to_word allows given 10 character phone number to convert into a word that is contained in the dictionary. The phone number should not contain 0 or 1. The matching words contain atleast 3 characters. You can find the dictionary file here: https://github.com/abhilashak/dictionary_file/blob/master/dictionary.txt

Installation

Add this line to your application's Gemfile:

gem 'ph_no_to_word'

And then execute

$ bundle

Or install it by yourself

$ gem install ph_no_to_word

Usage

After installing the gem do

irb(main):001:0> require 'ph_no_to_word'
=> true
irb(main):002:0> PhNoToWord.convert "2282668687"
=> ["act, amounts", "act, boo, tots", "act, boo, tour", "act, boot, mus",
    ....... "cat, coot, mus", "cat, coot, nus", "cat, coot, our", "catamounts"]

Results:
* act, amounts
* act, boo, tots
* act, boo, tour
* act, boot, mus
* act, boot, nus
* act, boot, our
* act, con, tots
* act, con, tour
* act, contour
.......
.......
* cat, con, tour
* cat, contour
* cat, coo, tots
* cat, coo, tour
* cat, coot, mus
* cat, coot, nus
* cat, coot, our
* catamounts
irb(main):004:0> PhNoToWord.convert '6686787825'
=> ["act, amounts", "act, boo, tots", "act, boo, tour", "act, boot, mus",
    ....."oot, orts, taj", "motor, truck", "motor, usual", "motortruck", "nouns, truck","nouns, usual"]

Results:
* act, amounts
* act, boo, tots
* act, boo, tour
* act, boot, mus
* act, boot, nus
* act, boot, our
* act, con, tots
.......
.......
* motortruck
* motor, truck
* motor, usual
* mot, opt, puck
* mot, opt, ruck
* mot, opt, suck
* noun, struck
* not, opt, puck

Contributing

Bug reports and pull requests are welcome on Github at https://github.com/abhilashak/ph_no_to_word. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PhNoToWord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.