Tagxplode 0.1

tarball: http://dark.fhtr.org/repos/tagxplode/tagxplode-0.1.tar.gz
git: http://dark.fhtr.org/repos/tagxplode

Description

Tagxplode finds related terms for a word or phrase.

The Tagxplode package contains a Ruby library and
command line app for querying related terms.

The intended use is to allow the usage of very precise
tags and not having to fill in all the related terms
manually. E.g. tag a photo with “bihänder”, explode the
tag and you are able to find it with “two-handed sword”
and “landsknechts” as well.

Tagxplode uses Wikipedia for getting the related terms
by doing a Wikipedia search for the term and following
the result link. Tagxplode then extracts the outgoing
wiki links off that page and prints out their titles.

As a result of Wikipedia being a wiki, you may encounter
vandalized pages. Also, you should limit the amount of
requests you do to no more than 30 tags per minute to
stay within Wikipedia’s use policy. Or, alternatively,
hack Tagxplode to work on a local copy.

Usage

$ tagxplode “bihänder”

$ tagxplode -0 “bihänder”

$ tagxplode -c “bihänder”

irb> require ‘tagxplode’

irb> Tagxplode.get_content(tag)

=> HTML string

irb> Tagxplode.get_related_terms(tag)

=> [array of strings]

Requirements

  • Ruby 1.8
  • hpricot

Install

De-compress archive and enter its top directory.
Then type:

($ su)
# ruby setup.rb

These simple step installs this program under the default
location of Ruby libraries. You can also install files into
your favorite directory by supplying setup.rb some options.
Try “ruby setup.rb --help”.

License

GPL v3

Ilmari H. <ilmari.heikkinen gmail com>