![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Ruby bindings for Whatlang, a natural language detection for Rust.
Features are derived from original Whatlang 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 'whatlang'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install whatlang
require "whatlang"
text = "Благодаря Эсперанто вы обрётете друзей по всему миру!"
info = Whatlang.detect(text)
info.lang.code # => "bul"
info.lang.name # => "Български"
info.lang.eng_name # => "Bulgarian"
info.script # => "Cyrillic"
info.confidence # => 0.2568924409819 (0 to 1 value)
info.reliable? # => false
text = "Jen la trinkejo fermitis, ni iras tra mallumo kaj pluvo."
list = ["eng", "ita"]
Whatlang.detect(text, allowlist: list).lang.code # => "ita"
Whatlang.detect(text, denylist: list).lang.code # => "epo"
If you're interested in only language information, use detect_lang
function:
lang = Whatlang.detect_lang(text)
lang.code # => "bul"
lang.name # => "Български"
lang.eng_name # => "Bulgarian"
Also, Whatlang can detect only scripts:
Whatlang.detect_script(text) # => "Cyrillic"
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/KitaitiMakoto/whatlang-rb.
This RubyGem distributed under the Ruby's license. See {file:COPYING} file.
FAQs
Unknown package
We found that whatlang demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.