LiberAI / NSpM

🤖 Neural SPARQL Machines for Knowledge Graph Question Answering.
http://aksw.org/Projects/NeuralSPARQLMachines
MIT License
223 stars 87 forks source link

Possible need to rename files #12

Open wannabeOG opened 5 years ago

wannabeOG commented 5 years ago

While splitting the data file into train, dev and test sets by running the following commands given in the README.md

cd data/monument_300/
python ../../split_in_train_dev_test.py --lines $NUMLINES  --dataset data.sparql

I run into the following error

Traceback (most recent call last): File "../../split_in_train_dev_test.py", line 42, in with open(sparql_file) as original_sparql, open(en_file) as original_en: IOError: [Errno 2] No such file or directory: 'data.sparql'

which can be solved by renaming the files in monument_300 (data_300.sparql and data_300.en to data.sparql and data.en)

wannabeOG commented 5 years ago

I have a hunch that the issue is not about renaming the files, I am going through the generator.py code to figure it out, check this issue out

panchbhai1969 commented 5 years ago

The issue is regarding the naming of files pertaining to corresponding instruction in the README.md . The filenames are hard-coded in the source file, the corresponding snippet is:

with open(output_dir + '/data_300.en', file_mode) as english_questions, open(output_dir + '/data_300.sparql', file_mode) as sparql_queries: