Hello Worlds
By WP (Planets2008.jpg) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons

Hello Worlds

In November 2009, I made a post on Cycorp's Blog that showed a minimal example of Cyc API usage with Research Cyc. In a reference to the long tradition of minimal code examples called HelloWorld, the code is called "Hello Worlds" and it does what you might expect. It's now six years later, and a colleague at Lucid.ai wanted some simple "getting started code", so I updated it to use the latest RC5 Cyc Public API.

Here's the gist of it: 

KbCollection planetInTheSolarSystem =
       KbCollectionFactory.get("PlanetInTheSolarSystem");
Set<KbIndividual> planets =
       (Set<KbIndividual>) planetInTheSolarSystem.getInstances();
for (KbIndividual planet : planets) {
        System.out.println("Hello '" + planet.toString() + "'.");
 }
And here's the github gist of it, all 33 lines.

Here's the output:

Hello 'PlanetMars'.
Hello 'PlanetVenus'.
Hello 'PlanetJupiter'.
Hello 'PlanetEarth'.
Hello 'PlanetNeptune'.
Hello 'PlanetMercury'.
Hello 'PlanetUranus'.
Hello 'PlanetSaturn'.

You'll need the maven dependencies at:  http://dev.cyc.com/api/core/download/index.html

and you'll need a copy of Research Cyc licensed by Cycorp. 

What's Before Science. What Happened If we convey our massages without any COMMUNICATIONS TOOL ?????

Like
Reply

To view or add a comment, sign in

More articles by Michael Witbrock

  • Fast Loop: Aotearoa Agentic AI

    A recurring question I’ve been asked—by colleagues in industry, government, and research—is: where will real…

    4 Comments
  • Your brilliant idea

    Every now and then someone asks me to validate a significant insight that they have had, and that has taken on a great…

  • Project Houston: “we’ve solved your problem”

    In June 2014, I participated in a workshop at the Wilson Center in D.C.

    3 Comments
  • Gaia: Learning to Be the World

    Recently I've been talking and writing about the notion of Dense Models in AI- models that fully represent the world in…

  • Deep Learning, Deep Reasoning & Dense Models

    Many recent advances in computer science have been driven by the convergent availability of large numbers of data and…

    8 Comments
  • Why Deep Inference is Better than Coding

    Large scale knowledge bases are inherently more flexible than dedicated databases and specific software. In traditional…

    2 Comments
  • AAAI 2016 Workshop on Knowledge Extraction from Text

    Please join me at our workshop for AAAI 2016 on Knowledge Extraction from Text! Call for Contributions…

    2 Comments

Explore content categories