0

I have a query that I'm asking from a Java program via the Query API that requires more problem space than the default. Is the :MAX-PROBLEM-SPACE parameter accessible through the APIs? If so, how do I set it?

Jess
  • 217
  • 1
  • 3
  • 14

1 Answers1

2

The com.cyc.baseclient.inference.params.DefaultInferenceParameters class provides a put method that allows you to set the value of any inference parameter that you know the SubL keyword symbol name for. For instance:

DefaultInferenceParameters params = new DefaultInferenceParameters(cyc);
params.put(CycObjectFactory.makeCycSymbol(":max-problem-count"), 500000);
  • Just a quick follow up on this. It looks as if many of the methods that you can use on `DefaultInferenceParameters` objects can also be used on `Query` objects. Originally, I was doing things like `setContinuable(false)` right on the `Query` instance. To use the suggestion above, I had to switch from doing that and do everything on the new `params` variable. Then I used `setInferenceParameters(params)` on the `Query` object. This seems to be working fine, but this was a point of minor confusion. – Jess May 04 '15 at 13:20