{"id":28435293,"url":"https://github.com/fnando/stemmers","last_synced_at":"2025-06-30T13:32:39.576Z","repository":{"id":295651844,"uuid":"990363645","full_name":"fnando/stemmers","owner":"fnando","description":"Stemming and language detection bindings for Ruby","archived":false,"fork":false,"pushed_at":"2025-05-26T17:25:18.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T11:06:42.712Z","etag":null,"topics":["gem","language-detection","ruby","stemming"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fnando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T02:21:13.000Z","updated_at":"2025-05-26T17:25:21.000Z","dependencies_parsed_at":"2025-05-26T17:49:20.872Z","dependency_job_id":"8b9906a7-6e4c-4149-96b8-45939577cc12","html_url":"https://github.com/fnando/stemmers","commit_stats":null,"previous_names":["fnando/stemmers"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fnando/stemmers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fstemmers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fstemmers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fstemmers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fstemmers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/stemmers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fstemmers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262783349,"owners_count":23363525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","language-detection","ruby","stemming"],"created_at":"2025-06-05T20:07:53.340Z","updated_at":"2025-06-30T13:32:39.538Z","avatar_url":"https://github.com/fnando.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stemmers\n\nRust bindings for https://whatlang.org and\nhttps://github.com/testuj-to/tantivy-stemmers for language detection and\nstemming.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add stemmers\n```\n\nIf bundler is not being used to manage dependencies, install the gem by\nexecuting:\n\n```bash\ngem install stemmers\n```\n\n## Usage\n\nThe language detection works in the context of the supported stemmers. If\nlanguage doesn't have a stemmer, then it'll return `nil`.\n\n```ruby\nrequire \"stemmers\"\n\nStemmers.detect_language(\"Hello there!\")\n#=\u003e \"en\"\n\nStemmers.detect_language(\"Olá, mundo!\")\n#=\u003e \"pt\"\n```\n\nTo stem a word, you can use the `Stemmers.stem_word(word, **options)` method.\n\n```ruby\nrequire \"stemmers\"\n\nStemmers.stem_word(\"running\", language: \"en\")\n#=\u003e \"run\"\n\nStemmers.stem_word(\"correndo\", language: \"pt\")\n#=\u003e \"corr\"\n```\n\nYou have a few options when stemming a word with\n`Stemmers.stem_word(input, **options)`:\n\n- `language`: The language to use for stemming. If not provided, it will try to\n  detect the language.\n- `normalize`: If set to `true`, it will normalize the word after stemming. This\n  is useful for languages that have diacritics or special characters.\n- `lowercase`: If set to `true`, it will lowercase the word before stemming\n  (stemming requires lowercase strings, but this is not done automatically to\n  avoid unnecessary transformations when using `Stemmers.stem(phrase)`.\n\nTo stem a phrase, you can use `Stemmers.stem(input, **options)`.\n\n```ruby\nrequire \"stemmers\"\n\nStemmers.stem(\"Testing this phrase\", language: \"en\")\n#=\u003e [\"test\", \"this\", \"phrase\"]\n```\n\nThe `Stemmers.stem(input, **options)` method has the following options:\n\n- `language`: The language to use for stemming. If not provided, it will try to\n  detect the language.\n- `normalize`: If set to `true`, it will normalize the word after stemming. This\n  is useful for languages that have diacritics or special characters.\n- `lowercase`: If set to `true`, it will lowercase the word before stemming\n  (stemming requires lowercase strings, but this is not done automatically to\n  avoid unnecessary transformations when using `Stemmers.stem(phrase)`).\n- `clean`: If set to `true`, it will remove stop words from the phrase (beware\n  that you may end up with an empty array). It uses the list of stop words from\n  \u003chttps://github.com/stopwords-iso/stopwords-iso\u003e (it's not a great list—it has\n  too much surprising words that shouldn't be in the list, but I couldn't find\n  anything better).\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake test` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release`, which will create a git tag for the version, push\ngit commits and the created tag, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/fnando/stemmers. This project is intended to be a safe,\nwelcoming space for collaboration, and contributors are expected to adhere to\nthe\n[code of conduct](https://github.com/fnando/stemmers/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Stemmers project's codebases, issue trackers, chat\nrooms and mailing lists is expected to follow the\n[code of conduct](https://github.com/fnando/stemmers/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fstemmers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Fstemmers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fstemmers/lists"}