When OpenNLP toolkit uses MaxEnt parser,it has to read in about 25 MBytes of model files. The model reader uses basic unbuffered FileReader. The result is the excessive number of system calls (and disk access calls) during the parser startup.
The fix is extremely simple:
In maxent-2.4.0/src/java/opennlp/maxent/io/ObjectGISModelReader.java,replace new FileInputStream(f) with new BufferedInputStream(new FileInputStream(f), . . . →Read More:Reducing disk thrashing of OpenNLP/MaxEnt parser –with one line code change
