gsi-upm / sematch

semantic similarity framework for knowledge graph
http://gsi-upm.github.io/sematch/
Other
432 stars 111 forks source link

Error when running sematch #9

Closed rmenendezm closed 7 years ago

rmenendezm commented 7 years ago

Hello,

My name is Raul and I am following the first step in the tutorial in order to use sematch but I kept getting the following error:

from sematch.semantic.similarity import WordNetSimilarity

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/sematch/semantic/similarity.py", line 25, in from sematch.semantic.sparql import EntityFeatures, StatSPARQL File "/usr/local/lib/python3.5/dist-packages/sematch/semantic/sparql.py", line 36 print query ^ SyntaxError: Missing parentheses in call to 'print'

Can you help me to fix this problem?

patvdleer commented 7 years ago

I have the same issue, that part of the code only seems to work on Python 2.7

patvdleer commented 7 years ago

https://github.com/brcordeiro/sematch seems to be fixed for python3 (according to the commit messages)

After a merge/pull-request that should be fixed, in the mean time it should be possible to fix it via

pip3 install git+git@github.com:brcordeiro/sematch.git

or pip3 install git+https://github.com/brcordeiro/sematch.git

I've just now created a pull request, https://github.com/gsi-upm/sematch/pull/10

manatoshadhikari commented 7 years ago

go this file : "/usr/local/lib/python3.5/dist-packages/sematch/semantic/sparql.py" and just comment out or correct the print, form print->print(), in python 3+ we need to have parenthesis which is missing here

patvdleer commented 7 years ago

I fixed that in a new pull request, #11

hopple commented 7 years ago

Thank you! Easy change but working good.

Spenhouet commented 6 years ago

This is still not working with Python 3.6.1 and sematch 1.0.4.