1

In the older OpenCyc Java API, it was possible to create a simple Cyc term by calling something like

new CycConstant("Cat", new Guid("bd590573-9c29-11b1-9dad-c379636f7270"))

When you do it this way, there's no round-trip to the server. With the new KB API (http://dev.cyc.com/cyc-api/kb-api.html), is there a way to do something like this, or is a call back to the server required in this API?

KnowsStuff
  • 100
  • 7

1 Answers1

1

Yes, KB API has to make at least one call to Cyc Server.

All KB API objects (with some exceptions) have a deprecated get method that takes underlying Base API objects.

For example, KBCollectionImpl.get(CycObject) is relevant for concept "Cat".

CycConstant catHL = new CycConstant("Cat", new Guid("bd590573-9c29-11b1-9dad-c379636f7270"));

KBCollection catEL = KBCollectionImpl.get(catHL);

This will help the API, by locating the HL term, which the API would have to if given only a string.

But to verify that the concept "Cat" in indeed a Collection, and to further make it an object of FirstOrderCollection, the API needs access to Cyc server.

Potentially we could, in a future version, relax this requirement if the user is certain and allow them to disable the check.

Vijay Raj
  • 146
  • 1
  • 4