Cyc Core API Suite
The Cyc Core API Suite is the core set of Java APIs for interacting with the Cyc inference engine
and knowledge base.
Core API Specification
The Core API specification consist of three interrelated APIs:
The KB API provides basic functionality for manipulating CycL-based Java objects.
The API extracts the main Predicate Logic constructs in the Cyc KB as Java classes.
A set of factory methods allow finding and creating terms and assertions. These
can be used to build sentences, to create new assertions or to build queries.
The Query API provides some classes and methods for requesting and handling answers to
arbitrarily complex questions posed to a Cyc server. Query objects specify such requests
and store the answers, and can be constructed by specifying a query sentence with zero
or more open variables, an optional microtheory, and other parameters to guide and control
the inference process. Alternatively, predefined query specifications can be loaded from a
Cyc KB, or natural language questions can be used to produce Query objects that can then be modified or combined prior
to being run. Inference answers can be inspected, with representations of variable bindings
in CycL and NL, and complete CycL sentences for each answer. They can also be iterated over
using a SQL-style result set, and can be exported in CSV or XML formats.
The Session API defines the basic functionality for connecting to a Cyc server, and is used for this
purpose by all the other Cyc APIs. The Session API replaces the need to directly manage
the configuration, creation, and caching of CycAccess objects that was common in the (now-deprecated) OpenCyc API.
Core Client Implementation
The Core Client Implementation provides the reference implementations for the Core API via the following modules:
- KB Client - Reference implementation of the KB API.
- Query Client - Reference implementation of the Query API.
- Session Client - Reference implementation of the Session API.
- Base Client - Client for connecting to a Cyc server and handling HL data; not supported for external developers.
- Core Client Implementation Bundle - Packages all the other Core Client implementation modules into a single artifact.
Usage
See the API Usage section for examples.
Server patching
As of version 1.0.0-rc3, the Core API Suite requires SubL code patches which are not present in ResearchCyc 4.0q or EnterpriseCyc 1.7-preview. These patches can be applied manually, or they can be automatically applied by the API bundle itself. For more details, see Server Patching.