
Security News
Researcher Exposes Zero-Day Clickjacking Vulnerabilities in Major Password Managers
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Can't stop dreaming about an easy language detector? Just use wtf_lang!
gem install wtf_lang
require 'wtf_lang'
WtfLang::API.key = "your_api_key" # you can get it here http://detectlanguage.com/
"ruby is so awesome!".lang # => "en"
"ruby is so awesome!".full_lang # => "ENGLISH"
#with a numeric value between 0-1.0 that represents the confidence level in the language code for the given text.
"ruby is so awesome!".lang_confidence # => ["en", 0.15502742]
"ruby is so awesome!".en? # => true
"ruby is so awesome!".english? # => true
If you want to cache results to make less requests to google API, use variables
text = "ruby is so awesome!"
text.lang #=> "en"
text.full_lang #=> "english"
It works with symbols too!
:"ruby is so awesome!".lang # => "en"
Copyright (c) 2012 nashby. See LICENSE.txt for further details.
FAQs
Unknown package
We found that wtf_lang demonstrated a not healthy version release cadence and project activity because the last version was released 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
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.