Cyc Java API

The Cyc API comprises a suite of Java APIs for developing Cyc-based applications or otherwise accessing Cyc capabilities. The Cyc API provides a layered suite of functionality organized as shown below. The API functionality will be rolled out in a series of releases:

  • The initial release, Release 1.0, of the Cyc API contains the Core functionality, i.e., the Base API, the KB API, and the Query API
  • Subsequent releases will include the Knowledge Management, Natural Language, Model, Structured Knowledge, and Administration APIs
    Diagram of the Cyc API stack

KB API

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.

Query API

The Query API provides 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.

Base API

The Base API defines the basic functionality for connecting to a Cyc server handling Heuristic Level (HL) data. It is the foundational API upon which the other Cyc APIs are built. Although the Base API is versatile, it is generally recommended that users employ the higher-level APIs (such as the KB API and the Query API) when possible.

The reference implementation of the Base API (com.cyc.base.*) is the Base Client (com.cyc.baseclient.*). These supercede the OpenCyc API, which is deprecated, though many of the Base API's interfaces resemble OpenCyc API classes.

Natural Language API

Available in a future release.

The NL API provides functionality for translating between CycL and natural language. In addition to translating sentences back and forth, it also allows more complex structures (e.g., particular answers to inferences) to be explained and contains facilities for understanding concepts and relations in running text.

Knowledge Management API

Available in a future release.

The KM API is a suite of commonly used tools to extract, modify and add new KB knowledge. These tools help visualize the KB content, search via NL, constrain results based on input conditions, and execute template queries. Additional tools extract and generate KB content from and to standard representations such as OWL. The API also provides tools to control and format the Query output to varying degrees of detail.

Administration API

Available in a future release.

The Administration API provides functionality to view, monitor, and administer Cyc images and their associated processes.

Model API

Available in a future release.

The Model API is a JAXB-like framework that partially maps First Order Predicate Logic constructs to Object Oriented (OO) constructs to facilitate application development. The API consolidates frequently used logic to OO idioms and generates a domain specific API given a vocabulary subset from the KB.

The Knowledge Base is a Predicate Logic-based model of real-world domain/concepts. Developing applications using a typical OO language requires translating the KB-based model to OO model. MAPI automates this process to streamline application development targeting the KB. It avoids duplication and inconsistency of hand-written OO models, helps reflect OE changes naturally to OO, supports a typical IDE in identifying changes at compile time, and provides OE details in the IDE.

The Domain Specific APIs generated by this API typically refer to real-world object, rather than Predicate Logic representations as in the KB API and implementation representations as in Base API.

comments powered by Disqus