
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
Ruby bindings for Whichlang, a natural language detection for Rust.
This is a fork of the original whatlang-rb but this adds an interface to the whichlang library. It's faster and detects languages better (although not as many languages).
Features are derived from original Whichlang library, which includes:
You need Rust's build environment to install this gem.
For Unix like system, run
% curl https://sh.rustup.rs -sSf | sh
For Windows, download and run installer.
See Rust official installation page for details.
Add this line to your application's Gemfile:
gem 'whichlang'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install whichlang
require "whichlang"
text = "Благодаря Эсперанто вы обрётете друзей по всему миру!"
info = whichlang.detect(text) # => "rus"
text = "Jen la trinkejo fermitis, ni iras tra mallumo kaj pluvo."
info = whichlang.detect(text) # => "spa"
# blank spaces and nil are ignored
info = whichlang.detect(" ") # => nil
info = whichlang.detect("") # => nil
info = whichlang.detect(nil) # => nil
After checking out the repo, run bundle config set local vendor/bundle && bundle install
to install dependencies. Then, run bundle exec rake test
to run the tests. You can also run bundle exec rake 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 Cargo.toml
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/bendangelo/whichlang-rb.
This RubyGem distributed under the Ruby's license. See {file:COPYING} file.
FAQs
Unknown package
We found that whichlang demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.