Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

giveme5w1h-corenlp install code not work for windows #33

Open
Jiaxinl7 opened this issue Apr 12, 2019 · 2 comments
Open

giveme5w1h-corenlp install code not work for windows #33

Jiaxinl7 opened this issue Apr 12, 2019 · 2 comments

Comments

@Jiaxinl7
Copy link

Jiaxinl7 commented Apr 12, 2019

When running giveme5w1h-corenlp install on windows, the code is not runable because rm, mv, unzip are not windows command.

For windows, need to change rm to del, mv to move and add an unzip.bat file for windows.

@fhamborg
Copy link
Owner

Good finding. Generally, we should avoid using any OS specific commands, such as del or rm, and use only Python code, such as os.remove.

@devdevgoat
Copy link

Yep, got the same issue. Looks like the problem is here, line 51 of the util.py..

Installing wget by itself just results in a hang due to an ssl check (need to add flag --no-check-certificate_, so it will require a refactor to use python logic (to call python only commands like unzip, if that's a thing?), or powershell modules perhaps? You'd also have to detect the os before hand... for now I just executed the commands manually:

  1. Navigate to \Lib\site-packages\Giveme5W1H\
  2. Create folder runtime-resources
  3. Download http://nlp.stanford.edu/software/stanford-corenlp-full-2017-06-09.zip and move it to runtime-resources
  4. Unzip the file
  5. Download http://nlp.stanford.edu/software/stanford-english-corenlp-2017-06-09-models.jar
  6. Move it to the unzipped folder stanford-corenlp-full-2017-06-09
  7. Delete the zip file

After that, I also launched the server manually with the command from the nlp website:

java -Xmx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000

Also, I noticed in the do command step the java command is calling java -mx4g instead of -Xmx4g, not sure if that's a bug or not, even when I correct it the start command never returns a server which is why I ended up just running the server manually.

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants