polifonia-project / sparql-anything-cookbook

0 stars 0 forks source link

How to read parameters from a configuration? #4

Open ccolonna opened 2 years ago

ccolonna commented 2 years ago

Is there a standard way to specify some parameters in a configuration file, or passing them from command line in the sparql anything query?

enridaga commented 2 years ago

Quick one passing arguments to the DBpedia Spotlight service:

fx -q parameters/spotlight.sparql -v text="Donald Trump wins the elections" -v confidence=0.2
enridaga commented 2 years ago

It is possible to pass parameter lists, for example, from a CSV file:

fx -q parameters/spotlight.sparql -i parameters/texts.csv

The query is repeated for each set of parameter values. Output will be saved in separate files, e.g.:

fx -q parameters/spotlight.sparql -i parameters/texts.csv -o parameters/output -f CSV
enridaga commented 2 years ago

Is this answering your question, @ccolonna ?

ccolonna commented 2 years ago

Absolutely, thank you very much @enridaga , really clear!