abitdodgy / gibran

Gibran is an Elixir natural language processor, and a port of WordsCounted.
http://hexdocs.pm/gibran
65 stars 3 forks source link

Ehances the Gibran.Tokeniser to accept more flexible exclusion options. #7

Closed abitdodgy closed 8 years ago

abitdodgy commented 8 years ago
  1. Minor version bump.
  2. The exclude option of Gibran.Tokeniser.tokenise/2 now accepts a list of any combination of regular expressions, functions, and/or strings. Previously it was limited to strings.

    Before:

     Gibran.Tokeniser.tokenise "Oh, hello wonderful world!", exclude: ["hello"]

    Now:

     Gibran.Tokeniser.tokenise "Oh, hello wonderful world!", exclude: ["world", &(String.ends_with?("ful")), ~r/oh/]