Project

profession

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Provides a list of professions and occupations to ruby app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.0
~> 0.14
~> 3.10
~> 1.5
~> 13.2
~> 1.66
 Project Readme

Profession

Build Status

Simple gem with a list of professions (over 1000), for matching and parsing professions in a large body of text. For instance this was helpful for parsing out Wikipedia articles for a little school project for my kids.

Please fill free to add more professions to the list, just send a simple PR. Thank you!

Installation

Add this line to your application's Gemfile:

gem 'profession'

And then execute:

$ bundle

Or install it yourself as:

$ gem install profession

Usage

  # Return a sorted unique list of all professions
  Profession::Profession.list


  # Check if your value is in the list, and has an exact match
  Profession::Profession.contains_exact?('Zoo Keeper')

  # Return exact match
  Profession::Profession.exact_match('Zoo Keeper')

  # Do a fuzzy match
  Profession::Profession.match('Keeper')

  #   [
  #     [0] "Book-keeper",
  #     [1] "Gamekeeper",
  #     [2] "Gate Keeper",
  #     [3] "Green Keeper",
  #     [4] "Housekeeper",
  #     [5] "Lighthouse Keeper",
  #     [6] "Lock Keeper",
  #     [7] "Park Keeper",
  #     [8] "Shop Keeper",
  #     [9] "Zoo Keeper"
  # ]

Important!

Matching is NOT case-sensitive and will also strip extra spaces when comparing.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/konung/profession. 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 Profession project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.