Main Program
The Semantic Hacker example tools are provided to demonstrate how to access the API and use the resulting signatures. The tools are intended to be both simple and useful.
Tools
Three tools are provided: signature, similarity, and category. The main help for these tools can be accessed by running the jar without arguments.
Main Program
$ java -jar sh-tools.jar
Usage: java -jar sh-tools.jar TOOL [OPTION]...
Run an example tool.
Available tools:
category Compute a category for a Semantic Signature
signature Get a signature from the API
similarity Compute the similarity of two Semantic Signatures
server Start a Match Server
shell Start a Match Shell
--help, -h, or /? or no arguments will display this help.
Version: 1.1
This software is licensed under the GPL version 2 or later.
A copy of the GPL is included in the COPYING file inside this jar.
Homepage: http://www.semantichacker.com
Conventions Used
- All provided tools recognize both long (--word) and short (-w) options.
- Help can be accessed by specifying no parameters, -h or --help.
- Anywhere that a file can be specified, - can be specified to mean stdin.
- The first argument that consists solely of -- turns off argument parsing, this allows file names to be passed to the similarity and category tools. However, a file name that is part of an argument cannot be passed this way.
- Long parameters which take arguments (such as --labels FILE) can also be passed using an equals sign (e.g. --labels=FILE).
The Labels File
While the API is capable of providing labels (and this option is on by default in the signature tool) this is not particularly efficient and wastes bandwidth. For this reason, SemanticHacker is distributing the Datafile which contains the labels for dimensions used in the API. All tools take a --labels parameter. This parameter specifies the file (which can be extracted from the Datafile archive) which contains the labels.