I assumed inference_to_explain.ttl is structured to contain triples.
I tried creating a file inf.ttl that contains one row:
:BreachTrd a <https://gbim.scotiabank.com/gbim/ontology/gbm-bim#Breach> .
:BreachTrd is an instance I loaded into stardog database ts
Breach is an OWL defined class I loaded into stardog database ts
When I run reasoning like this:
stardog reasoning explain ts inf.ttl
I get this response:
Unexpected end of file [L7]
My inf.ttl only has one line – how can stardog be complaining about Line 7
Does anyone have suggestions or tips on how to structure the turtle file to be processed by the inference engine? The documentation does not give an example.
The error message is confusing and misleading in this case but I believe the problem is CLI command cannot find the file. Let me explain. As shown in the examples you can explain an inferred triple by simply passing the triple as an argument to the command:
stardog reasoning explain myDb "ex:JohnDoe a ont:Person"
Note that, the command is being helpful and does not require you to have . at the end or declare prefixes which are done automatically. That is why you'd see and error about line 7 because prefixes have been prepended. But all this process should happen if the input is not a file. CLI cannot find the file, decides it must be a triple but then fails to parse the triple. You can verify the behavior like this:
$ stardog reasoning explain test file_does_not_exist
Unexpected end of file [L7]
Double check the path your input file is or simply pass the input as a string as above. We'll look into improving the error message to be clearer.
Still seems odd that it can't find the file. If there isn't something obvious like you were in the wrong directory try ./inf.ttl and the full path /path/to/my/file/inf.ttl