Git Product home page Git Product logo

Comments (6)

DennisDeSwart avatar DennisDeSwart commented on September 23, 2024

Looks like a timeout of the NLP server. It is probably because the text is long.

  1. Check if a short text works
  2. Try running NLP server without "-timeout". Only this:
    java -mx8g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000
  3. Remember that the speed may only be 100 words per second. That is about 4 sentences to 6 sentences per second. So it can take minutes to do a long text
  4. Also check if the PHP.ini execution time is long enough

Greetings,
Dennis

from php-stanford-corenlp-adapter.

sangyao avatar sangyao commented on September 23, 2024

Hello,
thank you for your answer,

  1. Check if a short text works. (it works)
    2.Try running NLP server without "-timeout". Only this:
    java -mx8g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 (I have tried it, but it works only for short text (like 50 words))
  2. Remember that the speed may only be 100 words per second. That is about 4 sentences to 6 sentences per second. So it can take minutes to do a long text
    4.Also check if the PHP.ini execution time is long enough (also tried, but didn't work)

I used the code you uploaded for testing, and didn't change anything. There will be an error for more than 50 words of article.

thank you

Best regards

Yao

from php-stanford-corenlp-adapter.

DennisDeSwart avatar DennisDeSwart commented on September 23, 2024

In the file "bootstrap.php" find this line:
define('USE_GUZZLE', TRUE);

Try setting:
define('USE_GUZZLE', FALSE);

Normally CoreNLP_adapter uses "Guzzle" but maybe this is causing a problem for you. By setting it off, it will do a cURL call. Maybe this will solve the problem

from php-stanford-corenlp-adapter.

DennisDeSwart avatar DennisDeSwart commented on September 23, 2024

Also, in "bootstrap.php" there is this line:
define('ONLINE_API', FALSE);

If you set:
define('ONLINE_API', TRUE);

Then you can use the online version of CoreNLP. If that works, the way that you setup the Java server is the problem.

from php-stanford-corenlp-adapter.

sangyao avatar sangyao commented on September 23, 2024

thank you for your answer, it works, if the text max. 500 word. But it is ok for my projekt.

from php-stanford-corenlp-adapter.

sangyao avatar sangyao commented on September 23, 2024

hello,
I still have a question,every time i must start the CoreNLP serve from the command line. just like you write "java -mx8g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000"

How can my system automatically connect java server,can Apache achieve this function?

thank you very much

yao

from php-stanford-corenlp-adapter.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.