gsi-upm / sematch

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

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? #37

Open teohsinyee opened 2 years ago

teohsinyee commented 2 years ago

Run this:

from sematch.semantic.similarity import WordNetSimilarity
wns = WordNetSimilarity()

print(wns.word_similarity('dog', 'cat', 'li'))

It returned errors:

Traceback (most recent call last):
  File "d:\resume-parsing-private\sematch_test.py", line 1, in <module>
    from sematch.semantic.similarity import WordNetSimilarity
  File "C:\Users\sin-yee.teoh\AppData\Local\Programs\Python\Python310\lib\site-packages\sematch\semantic\similarity.py", line 25, in <module>
    from sematch.semantic.sparql import EntityFeatures, StatSPARQL
  File "C:\Users\sin-yee.teoh\AppData\Local\Programs\Python\Python310\lib\site-packages\sematch\semantic\sparql.py", line 36
    print query
    ^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
corscheid commented 2 years ago

Looks like this module is still on Python 2.7 Those of us on Python 3.x are out of luck, it seems. (Unless someone wants to create a PR of converting this whole thing to Python 3.x if it hasn't been done already?)

EDIT: See #31

yaserabdelaziz commented 1 year ago

See https://github.com/gsi-upm/sematch/issues/31#issuecomment-1206576240