I am trying to run the code as listed on Github, https://github.com/duytinvo/ijcai2015. However, after running the command: python targetdep+.py, I received the following error:
IOError: [Errno 13] Permission denied: '../data/output/training'
This is the part of the code that caused the error:
def writevec(filename,x,y):
f=open(filename,'wb')
for i in xrange(len(y)):
f.write(str(y[i])+'\t')
feature=x[i]
for (j,k) in enumerate(feature):
f.write(str(j+1)+':'+str(k)+' ')
f.write('\n')
f.close()
if __name__ == "__main__":
features=targettw()
print "extracting features for training"
x_train,y_train=features.allfeat('../data/training/')
writevec('../data/output/training',x_train,y_train)
print "extracting features for testing"
x_test,y_test=features.allfeat('../data/testing/')
writevec('../data/output/testing',x_test,y_test)
Anyone knows what have I done wrongly? How can I resolve this error? Thanks in advance!