Code Samples

Example usage of Cyc APIs:

Basic Core API usage
An introduction to looking up facts in the KB, adding new facts, and performing basic queries.
Advanced querying
A set of examples focused on more advanced uses of the com.cyc.query class.
Query justification via proofviews
How to traverse the assertions that are used to produce a particular answer to a Cyc query. (Not supported for OpenCyc.)
Proofview marshalling
How to marshal a proofview as XML to an OutputStream. (Not supported for OpenCyc.)

You may also download these code samples from the Cyc API Examples repository.