Skip to content

Extracts semantic datas from zemanta, textwise (Semantic Hacker), OpenCalais and Yahoo

License

Notifications You must be signed in to change notification settings

apneadiving/SemExtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SemExtractor

SemExtractor is made to have in a single place, wrappers for most of the semantic librairies:

  • Zemanta

  • Semantic Hacker from Textwise

  • Yahoo Boss

  • OpenCalais

Please tell me if there are more API’s to include!

After using Term Extraction gem, I happened to need the score of the different tags I got from the different APIS + I wanted to use Nokogiri for performance concerns. I thank alexrabarts, because his work gave me the idea to create my first gem

Installation

gem install sem_extractor

Examples

For sure, you’ll have to request your own API Key for each kind of API you want to use. Most of the methods below retrieve a hash with ‘name’ and ‘score’

Initialize:

yahoo = SemExtractor::Yahoo.new(:api_key => your_key, :context => your_text) zemanta = SemExtractor::Zemanta.new(:api_key => your_key, :context => your_text) sem = SemExtractor::Textwise.new(:api_key => your_key, :context => your_text_or_url) calais = SemExtractor::Calais.new(:api_key => your_key, :context => your_text)

Get info:

yahoo.terms zemanta.terms zemanta.categories sem.terms sem.categories sem.filter #filters the useful content of a web page, retrieves text calais.terms calais.categories calais.geos

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Todo

I’ve to create the tests for this gem… :)

Copyright © 2010 apneadiving. See LICENSE for details.

About

Extracts semantic datas from zemanta, textwise (Semantic Hacker), OpenCalais and Yahoo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages