<commit_before>= UrbanLexicophile

UrbanLexicophile allows you to retrieve definitions of terms from UrbanDictionary.com

== Installation

  gem install urbanlexicophile

== Note on Usage

UrbanDictionary.com does not provider a public API, please be mindful of this if you use this gem. It works by scraping each page for the definitions. It's probably better if you don't use this gem for anything but personal research, but if you do use it for otherwise please be considerate and cache results and give credit and a link to UrbanDictionary.com

== Usage

First, call this to get an array of all definitions:
  definitions = UrbanLexicophile.define("urban dictionary")

Then you can iterate through them in the usual manner:
  definitions.each do |definition|
    # display all information about each definition
    puts definition.title
    puts definition.definition
    puts definition.example
    puts definition.author
  end

As the definitions are returned as an array, you could just do this if you only one the most popular definition:
  most_popular = definition.first

If there are no definitions for the desired term, the return is just an empty array.

== Dependencies

* Nokogiri

== TODO

* Retrieve vote information about each definition and implement Definition.score()
* Retrieve the Urban Word of the Day
* Retrieve information about definition authors
<commit_msg>Fixed typo in README<commit_after>= UrbanLexicophile

UrbanLexicophile allows you to retrieve definitions of terms from UrbanDictionary.com

== Installation

  gem install urbanlexicophile

== Note on Usage

UrbanDictionary.com does not provider a public API, please be mindful of this if you use this gem. It works by scraping each page for the definitions. It's probably better if you don't use this gem for anything but personal research, but if you do use it for otherwise please be considerate and cache results and give credit and a link to UrbanDictionary.com

== Usage

First, call this to get an array of all definitions:
  definitions = UrbanLexicophile.define("urban dictionary")

Then you can iterate through them in the usual manner:
  definitions.each do |definition|
    # display all information about each definition
    puts definition.title
    puts definition.definition
    puts definition.example
    puts definition.author
  end

As the definitions are returned as an array, you could just do this if you only one the most popular definition:
  most_popular = definitions.first

If there are no definitions for the desired term, the return is just an empty array.

== Dependencies

* Nokogiri

== TODO

* Retrieve vote information about each definition and implement Definition.score()
* Retrieve the Urban Word of the Day
* Retrieve information about definition authors

{'fraction_non_alphanumeric': 0.038129496402877695, 'fraction_numerical': 0.0, 'mean_word_length': 4.3895348837209305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7264415', 'n_tokens_mistral': 692, 'n_tokens_neox': 671, 'n_words': 375}