Hi,

On 28/10/16 15:28, kumar rohit wrote:
Hello
I have two to three rules in my java code but the number of rules now
increased and I need to write it in the file and imports it.
I want to ask what changes I need to do inside my code.
Or just write
*Reasoner reasoner = new GenericRuleReasoner( Rule.rulesFromURL( **"rules.t*
xt" ) );

instead of

Reasoner reasoner = new GenericRuleReasoner(Rule.parseRules(rule));

See https://jena.apache.org/documentation/inference/#rules and scroll down. That shows you the two options (rulesFromURL or rulesParserFromReader).

Also is it necessary that rules.txt will be in the project folder?

No, whether you use a URL or open a reader and parse from that the file can we anywhere that your java process is allowed to access.

Dave


Reply via email to