Assertion inserting into KB problem using Java API

Help
Lixia Zhou
2014-05-20
2014-05-20
  • Lixia Zhou
    Lixia Zhou
    2014-05-20

    Dear Sir,
    I have a problem about the assertion inserting problem.
    Below is the code snip for assertion construction and inserting:
    "CycFormulaSentence gaf = CycFormulaSentence.makeCycFormulaSentence(
    access.getKnownConstantByName("likesAsFriend"),
    access.getKnownConstantByName("BillClinton"),
    access.getKnownConstantByName("HillaryClinton"));
    ELMt peopleDataMt = access.makeELMt(access.getKnownConstantByName("PeopleDataMt"));
    access.assertGaf(gaf, peopleDataMt);

    boolean isValid = access.isGafValidAssertion(gaf, peopleDataMt);
    System.out.println(isValid);
    String id = DefaultCycObject.toCompactExternalId(gaf, access);
    System.out.println(id);
    "
    The result is printed below:
    "
    true
    Mw2DHiu9WLpsnCkRsZ2tw3ljb3JwHivBAGnknCkRsZ2tw3ljb3JwHiu9XtKqnCkRsZ2tw3ljb3Jw
    "

    The external id is already obtained.
    But when I use the external id or (likesAsFriend BillClinton HillaryClinton) to query in the KB browser, there is no term founded.
    While I use the ASK tool, I input (likesAsFriend BillClinton HillaryClinton), I can get the result
    "query is proven True".

    I think the two results are conflicted. So I'm really confused whether the assertion is inserted or not?

    Anyone could explain this for me? Thanks very much~~