New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

machine_classifier

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machine_classifier

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

MachineClassifier

MachineClassifier is a thin wrapper around the APIs used to call machine learning classification systems.

Currently, only Google Prediction is supported.

Installation

Add this line to your application's Gemfile:

gem 'machine_classifier'

And then execute:

$ bundle

Or install it yourself as:

$ gem install machine_classifier

Usage

Google Prediction

require 'machine_classifier'

text = 'Some text that I want to classify'

configuration = MachineClassifier::Configuration.new do |conf|
  conf.api_version           = '1.6'
  conf.developer_email       = 'developer_email@example.com'
  conf.private_key           = 'Binary data'
  conf.private_key_password  = 'private_key_password'
  conf.project               = 'Google Prediction Project Name'
  conf.model                 = 'Google Prediction Model'
  conf.application_name      = 'My Appliction'
  conf.application_version   = '1.0.0'
end

client = MachineClassifier::Client.new(configuration)
result = client.call(text)
raise 'Classification call failed' if not result.success?
puts "Text: #{text}"
puts "Label: #{result.winner}"

Contributing

  1. Fork it ( https://github.com/[my-github-username]/machine_classifier/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 07 Apr 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc