3 ms·
I worked on a project (customer recommendation stuff, not that interesting in and of itself) that used Stanford's CoreNLP. Due to the project not being written
by stephenr 11y ago
I worked on a project (customer recommendation stuff, not that interesting in and of itself) that used Stanford's CoreNLP.
Due to the project not being written in Java, we obviously needed a way to communicate with CoreNLP without the cost of calling java for every job.
The solution in the end was to fork an existing (Java) project that wraps CoreNLP and exposes it over HTTP.
The fork adds:
- support for JSON (the original was XML only)
- packages it for Debian
- defaults to "today" for relative dates
- adds a utility class 'RegexNERValidator' to allow testing/quoting of mapping files for CoreNLP's RegexNER, to allow checking a file can be used by RegexNER before the main CoreNLP process is restarted.
The result is at https://github.com/Koalephant/StanfordCoreNLPHTTPServer https://github.com/Koalephant/StanfordCoreNLPHTTPServer
Please note: I do not usually work in Java, so I'm well aware there are likely better ways to achieve some/many/all things this project does. If you feel inclined to improve it, send a PR (preferably with some indication of why its an improvement, if its not an obvious bug/feature improvement).
- tangled_zans 11y agoWow, thanks for sharing! I did look at CoreNLP before and the fact that it's in Java has put me off, so this will be useful :)
- stephenr 11y agoYou're welcome, I'd love to hear what you end up building.