From 6cacd5f9a80bffe3d50a4bc26e658bfeddf0e2c5 Mon Sep 17 00:00:00 2001 From: Netkas Date: Fri, 8 Jan 2021 22:24:32 -0500 Subject: [PATCH] Updated Makefile --- Makefile | 4 ++++ README.md | 3 ++- services/corenlp/Makefile | 19 +++++++++++++++++++ services/corenlp/build.xml | 20 ++++++++++---------- services/corenlp/update_model.py | 3 +++ 5 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 services/corenlp/update_model.py diff --git a/Makefile b/Makefile index b506d52f..cfabd78f 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,9 @@ build_spamdetect: build_translation: cd services/translation; python3 setup.py build; python3 setup.py sdist +build_corenlp: + cd services/corenlp; make build + build: make build_nlpfr make build_his @@ -89,6 +92,7 @@ build: make buid_translation make build_langdetect make build_spamdetect + make build # ====================================================================================================================== diff --git a/README.md b/README.md index 8f7a7cbc..ced8be07 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,5 @@ make start_translate # Starts the translation server, runs on port 5603 |--------------------------------|----------|------| | CoffeeHouse Language Detection | HTTP | 5606 | | CoffeeHouse Spam Detection | HTTP | 5601 | -| CoffeeHouse Translate | HTTP | 5603 | \ No newline at end of file +| CoffeeHouse Translate | HTTP | 5603 | +| CoffeeHouse CoreNLP | HTTP | 5604 | \ No newline at end of file diff --git a/services/corenlp/Makefile b/services/corenlp/Makefile index e69de29b..441c4aca 100644 --- a/services/corenlp/Makefile +++ b/services/corenlp/Makefile @@ -0,0 +1,19 @@ +clean: + rm -rf build + +build: + # Building JAR + mkdir build + ant jar + mv coffeehouse_corenlp.jar build/ + + # Adding Libs + cp lib/* build/ + cp liblocal/* build/ + + # Updating models + python3 update_model.py + cp /var/resources/CoffeeHouseData-CoreNLP/* build/ + +start: + cd build; java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 5604 -timeout 15000 \ No newline at end of file diff --git a/services/corenlp/build.xml b/services/corenlp/build.xml index 302e4cf2..a9c5807e 100644 --- a/services/corenlp/build.xml +++ b/services/corenlp/build.xml @@ -392,7 +392,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -465,7 +465,7 @@ - + @@ -494,7 +494,7 @@ - + @@ -535,7 +535,7 @@ description="build the parser webapp"> + webapp.jar="coffeehouse_corenlp.jar"> @@ -565,11 +565,11 @@ description="build the ner webapp"> + coffeehouse_corenlp.jar --> - + @@ -595,11 +595,11 @@ description="build the corenlp webapp"> + coffeehouse_corenlp.jar --> - + @@ -647,7 +647,7 @@ identifier="edu.stanford.nlp.trees.tregex.gui.TregexGUI" mainclassname="edu.stanford.nlp.trees.tregex.gui.TregexGUI"> - + diff --git a/services/corenlp/update_model.py b/services/corenlp/update_model.py new file mode 100644 index 00000000..688b1cb9 --- /dev/null +++ b/services/corenlp/update_model.py @@ -0,0 +1,3 @@ +from resource_fetch import ResourceFetch +rf = ResourceFetch() +rf.fetch("Intellivoid", "CoffeeHouseData-CoreNLP") \ No newline at end of file