Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


OpenCYC: Unable to save and load a cyc-world

  • Mx79

    Hy Guys...

    I tried everything but nothing works. I just want to save my entered information to a cyc-world file and read about two different ways to do so (one in the readme.txt and one in the FAQ of opencyc's website). They are different but NONE of them works. Please help!

    After entering the command write-image... I always get the error message:
    ERROR: variable WRITE-IMAGE is unbound.
    If I change the minus to a space and enter write image... I get no error message but the file is not saved either.

    Information from the Readme.txt:

    You can save the state of the OpenCyc world by entering the form
    (write-image "world/<filename>") before shutting down using
    (exit).  To restart OpenCyc: run-cyc-world world/<filename>

    Information from the FAQ:

    Because there are so many concepts and assertions in OpenCyc, it seems that there should be some kind of database where these are stored that I can update. But I can't find the database after installing. Where is it?

    The Cyc Knowledge Server has its own proprietary storage mechanism built in. Concepts and assertions are stored in a "world" file. The one that comes with the download is the file named latest.load in the run/world/ directory.

    After you add constants and assertions of your own, you can save out a new world. Either in the SubL interactor (available from the Nav screen) or in the xterm window where you started Cyc:

    Type (write-image "world/mynewworld") [where 'mynewimage' is really any filename you choose.
    Quit out of Cyc. You can do this by typing '(exit)' [without the quotes but with the parens) in the window where you started Cyc.

    The next time you start Cyc, don't use the './runcyc' script. Instead,

    cd to the run directory
    cd to the world directory
    check that your 'mynewworld' file is in the world directory
    cd .. [back to the run directory]
    type: bin/latest.bin -w world/mynewworld [again, 'mynewworld' is whatever filename you used]

    Now the constants and assertions you added last time should be viewable from the KB browser.

    You can keep saving worlds out under new names if you want to keep a revision history, and you can delete old worlds at any time.

    As for databases, there are two main ways Cyc can be used with databases. There is SKSI (Semantic Knowledge Source Integration), which lets data from databases be available to the knowledge base as virtual data (expected in version 1.0) and there's work being done on a 'backing store', which will be disk-based storage that at first will be used for some of the more data-like content in the KB.

    Thanks for the Help!!!

    • Yeb Havinga
      Yeb Havinga

      In which screen/prompt/telnet session?
      What is the *exact* command as you type it?
      What is the exact response?

      Just copy paste of your screen output would be fine, copy pasting large chunks of faq that apparently didn't solve your problem... => well... not :-)

    • Mx79

      I am such a dude that I almost wouldn't dare to write down the solution of my problem... (by the way: I am using windows xp, but the solution should be independent of the OS)

      The error message was:
      "ERROR: variable WRITE-IMAGE is unbound"

      The parantheses were missing - that's it!!!!

      CYC expects certain commands to be written within parantheses. If you are in the command-line and are in the layer to enter commands you should see some string like "CYC(1):" at the beginning of the last/current line. Enter your command here now using parantheses.

      Instead of my wrong command:
      CYC(1): write-image "world/myworld" (which is wrong!!!!!)
      write the command like this:
      CYC(1): (write-image "world/myworld") (which works fine)

      Now that he found the file, the loading process was no problem at all. Just use the command of the readme.txt:
      run-cyc-world "world/myworld"
      in the command window.

      CYC itself uses the file-extension .load but if you enter nothing else than the name of your world (like myworld here) it is no problem - it worked for me at least.

      Hope I could help some of you as well...

      Bye, Mx.