AskNowQA / EARL

Entity And RELation mapping
GNU General Public License v3.0
100 stars 18 forks source link

IndexError in TextMatchServer.py #21

Closed 111sarah closed 4 years ago

111sarah commented 4 years ago

Hi, I'm trying to set up this code. But when I run the TextMatchServer.py file, I got "IndexError: list index out of range" error. Can you help me to solve this error?? (Pls refer the attached screenshot) code11

debayan commented 4 years ago

Hi Sarah, You have to also specify the port number. Please send me the output including the command you typed. Please check the Readme file to see how to specify the port number.

111sarah commented 4 years ago

I specified the port number. Now it doesn't give any result and take a long time to execute. Displayed the print statement only.(I'm trying to set up with python 3.7) code111

111sarah commented 4 years ago

This error occurred after running the code, error2

debayan commented 4 years ago

The code does not work with Python 3.7. It only works with Python 2.6. TextMatchServer does not produce any output. It is an API that api.py accesses. Please read the README file properly before running the code.

111sarah commented 4 years ago

What's the effort on working this in python 3.7?

debayan commented 4 years ago

If you can find a version of practnlptools (in https://github.com/AskNowQA/EARL/blob/master/scripts/ShallowParser.py) that works in python 3.6, it is possible to port the EARL code.

111sarah commented 4 years ago

practnlptools works mainly for python 2.7 only. It is not compatible with python 3 versions.

111sarah commented 4 years ago

Hi, I try to set up the code in the Linux environment with python 2.7. I have followed all the steps mentioned in the readme file. But the code finished executing with an error. I have attached all the screenshots regarding the steps and error. please be kind enough to help me to solve this error. run TextMatchServer py on 8888 run api py on 4999 curl commnd error after run the curl comnd

YanaPalacheva commented 4 years ago

Hi! I can only suggest reformulating the query to the question form. Like "Who was born in America?".

I tried to set this up on Windows 10 (64bit), but I got stuck since it seems impossible to install pytorch (1.1.0) for python 2.7. How did you do it, if you still remember?

I also converted all scripts to python 3 with 2to3 tool, but it also got stuck on another problem: it can't read bloom files: Joint Linker initializing 'charmap' codec can't decode byte 0x98 in position 5950: character maps to <undefined>. However, I don't think it's a good strategy to run it on python3 anyway because it seems like I will encounter problems related to that again and again.

debayan commented 4 years ago

Thank you for using EARL.

I will make an attempt to port EARL to python3.x this weekend.

YanaPalacheva commented 4 years ago

Hi, thank you very much! I basically wanted to see how it works, so I tried live API out, but it crashed with 500 Internal Server Error. Maybe you could have a look at that as well if you have time :)

debayan commented 4 years ago

The API has been fixed. Try again.

debayan commented 4 years ago

Kindly try the code in branch 'python3'. I have attempted to port to python 3.8. If there are no issues, I shall merge the changes to master branch.

debayan commented 4 years ago

Merged the branch to master for better visibility.

YanaPalacheva commented 4 years ago

Hi! Thank you very much, it works now! Minor issues (details: Window 10 OS, conda environment for Python 3.8 64 bit):

debayan commented 4 years ago

@YanaPalacheva great to know that it even works on Windows! We focus on supporting on Linux.

nimo21 commented 4 years ago

Hi @debayan, I'm trying to set up this code. Do I need to train the ER predictor and the re-ranker models?