OMCSNetCPP includes an example application, 'omcsnet' that allows knowledge base lookup and inference tasks to be performed via the command-line. This application resides in the 'test' directory within the omcsnet project source tree.

Click [Here] to return to the main project page.

Displaying Command-Line Help
# ./omcsnet --help
This command displays the following usage information:
Usage: ./omcsnet [OPTION] ...
  --gen-pred			Generates a predicates.dat file.
  --lookup (concept)		Searches for (concept)
  --path (concept1) (concept2)	Finds all paths from (concept1) to (concept2)
  --context (concept,...)	Finds all concepts in context of (concept(s))
  --analogous (concept)		Finds analogous concepts of (concept)

Getting Version Information
#./omcsnet --version
This command displays the following version information:
./omcsnet (omcsnetcpp test application) 1.0a
Copyright (C) 2003  Elliot Turner
This program is distributed under the terms of the: GNU General Public License.

Generating a predicates.dat File
#./omcsnet --gen-pred
This command generates an optimized binary predicates.dat file, an optimized version of the raw predicates.txt file provided by the OMCSNet project.

Searching for a Concept within the Semantic Network
#./omcsnet --lookup (concept)
Examples:
#./omcsnet --lookup dog
#./omcsnet --lookup 'potato chip'
This command searches the semantic network of OMCSNet data for a specific concept. If a matching concept is found, the forward and backward links to other nodes in the network are displayed to stdout (See Example Output).

Searching for all Paths between two Concepts
#./omcsnet --path (concept1)  (concept2)
Example:
#./omcsnet --path gun death
This command searchs the semantic network of OMCSNet data for all paths between (concept1) and (concept2). If any paths are found during this search, they are displayed to stdout (See Example Output).

Searching for Concepts within a Specific Context
#./omcs.net --context (concept,...)
Examples:
#./omcsnet --context 'magazine'
#./omcsnet --context 'tank,gun,jeep'
#./omcsnet --context 'tree,forest'
This command searches the semantic network of OMCSNet data for concepts within a specific context. The context is made up of one or more concepts within OMCSNet. If any concepts are found during this search, they are displayed to stdout along with their associated contextual score (##%) (See Example Output).

Searching for Concepts that are Analogous to Another Concept
#./omcsnet --analogous (concept)
Examples:
#./omcsnet --analogous airplane
#./omcsnet --analogous sculpture
This command searches the semantic network of OMCSNet data for concepts that are analogous to (concept). If any concepts are found during this search, they are displayed to stdout along with the semantic links shared with (concept) and their similarity score (##%) (See Example Output).