Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gauravtiwari/email_predictor
Simple email predictor console program
https://github.com/gauravtiwari/email_predictor
Last synced: 18 days ago
JSON representation
Simple email predictor console program
- Host: GitHub
- URL: https://github.com/gauravtiwari/email_predictor
- Owner: gauravtiwari
- License: mit
- Created: 2014-11-23T19:02:30.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-25T17:40:47.000Z (about 10 years ago)
- Last Synced: 2024-11-25T12:42:04.800Z (28 days ago)
- Language: Ruby
- Homepage:
- Size: 234 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Email Predictor Ruby Program
===========================The requirements are outlined in [requirements.md](requirements.md). Please read.
### Prerequisites
Please make sure Git, ruby and rubygems are installed in your computer.### Download
From the Terminal (wherever you want to keep), run:```
$ git clone [email protected]:gauravtiwari/email_predictor.git && cd email_predictor/ && bundle
```
### Usage
Type below command to run the predictor, this will use data/data.rb dataset to output results:```
$ ruby predict.rb
```
To add custom new clients open data/data.rb and modify CLIENTS hash to add data and add new test clients/customers data to TEST hash:If you wish to use *irb*, please require the files using:
```
$ require './module.rb'
```
Start a new predictor:```
predictor = Base.new(GIVEN_FORMATS)
```
You can seed as many emails/name as you want in Clients hash in the data/data.rbAdd the data to the base class:
```
predictor.context(CLIENTS)
```
Generate predictions:
```
predictor.predict('John Doe','alphasights.com')
predictor.predict('Sam Doe','google.com')
predictor.predict('Jony Ive','apple.com')
```An array will be generated containing all the matched predictions.
Checkout predict.rb for more details.
### Testing
To run the specs:
```
$ rspec
```
The test results are available in HTML format in [rspec_results.html](rspec_results.html).