sematch icon indicating copy to clipboard operation
sematch copied to clipboard

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

Open teohsinyee opened this issue 2 years ago • 2 comments

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(...)?

teohsinyee avatar Apr 12 '22 07:04 teohsinyee

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

corscheid avatar Jun 24 '22 23:06 corscheid

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

yaserabdelaziz avatar Aug 05 '22 15:08 yaserabdelaziz