percyliang / sempre

Semantic Parser with Execution
Other
828 stars 301 forks source link

How to get sparql expressions stored in a file? #206

Closed mr-asleep closed 4 years ago

mr-asleep commented 4 years ago

Hi, I am getting the sparql expressions in the log file. But is there any way to get them in a text file in an organised manner.

This is the command that I am using: ./run @mode=simple-freebase-nocache @sparqlserver=localhost:3001 -Grammar.inPaths dbpedia/dbpedia.grammar -SimpleLexicon.inPaths dbpedia/output.lexicon -SparqlExecutor.verbose 10 -FeatureExtractor.featureDomains rule opCount constant whType lemmaAndBinaries denotation lexAlign joinPos skipPos -Dataset.inPaths test:dbpedia/que.json -Learner.maxTrainIters 0 -exec.execDir dbpedia/out/ Please help me to get the sparql expression for each top predicted candidate in an output file just like how we get top predicted derivation for each utterance

ppasupat commented 4 years ago

Unfortunately, the SPARQL queries only exist in the internal computation of SparqlExecutor. The query seems to be discarded after execution.

Currently, the possible options would be:

mr-asleep commented 4 years ago

Okay. Thanks a lot