How can we run a python script (which uses nltk and scrapy) from java

I have written python scripts that use scrapy, nltk and simplejson in my project, but I need to run them from java as my mentor wants to deploy them to the server and I have very little time for this. I looked at runtime.exec () in java and jython, it goes without saying that running system commands from java do not look simple either.

So, I would like to know if python scripts from java work in the form of the -python example.py 'system command using runtime.exec () or, alternatively, using jython will be simpler and really doable, or is there a simpler workaround. It would also be useful to know if anyone had run python code that uses nltk from java using Jython and if they had any problems. Please help me as I have to do this as asap. All thoughts and suggestions on this subject are welcome.

Thanks in advance!

+3
source share
1 answer

Jepp python Java. script . .

+3

Source: https://habr.com/ru/post/1754359/


All Articles