Getting ready

To prepare, we need to do the following:

  1. Create a new Maven project
  2. Add the following dependency to the POM file:
<!-- https://mvnrepository.com/artifact/edu.stanford.nlp/stanford-corenlp -->
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-parser</artifactId>
<version>3.9.2</version>
<dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.9.2</version>
</dependency>
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.9.2</version>
<classifier>models</classifier>
</dependency>

You may need to increase the amount of space used by the Java Virtual Machine (JVM) for the program to execute. During the execution of the program, you might get the following exception:

StanfordCoreNLP Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

If so, you will need to increase the amount of memory used. This specifies how this is done as it varies by the Java development environment. However, most IDEs provide a means to modify the VM arguments of the JRE used. Using the argument, -Xmx4096M, will probably work. If not, try using a larger value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.63.62