This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.51 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
VERSION := $$(cat pom.xml | grep "^ <version>.*</version>$$" | awk -F'[><]' '{print $$3}')
version:
@echo $(VERSION)
dependencies:
mkdir -p lib
cd lib && wget -N http://rgai.inf.u-szeged.hu/project/nlp/research/magyarlanc/magyarlanc-3.0.jar
cd lib && wget -N http://rgai.inf.u-szeged.hu/project/nlp/research/NER/tagEntities.jar
install:
mvn install
mvn dependency:copy-dependencies
cp ./target/*.jar ./bin/
cp ./target/dependency/*.jar ./bin/
clean:
mvn clean
rm -f bin/*.jar
rm -f hunlp.zip
serve:
./bin/hunlp.sh
release:
zip hunlp.zip -r bin/*
smoke-test:
echo "Testing annotation endpoint"
curl -H "Content-Type: application/json" -X POST -d '{"text": "Hol lakik a télapó? Az északi sarkon!"}' localhost:9090/v1/annotate
echo "Testing tag_entities endpoint"
curl -H "Content-Type: application/json" -X POST -d '{"text": "Hol lakik a télapó? Az északi sarkon!"}' localhost:9090/v1/tag_entities
echo "Testing tokenize endpoint"
curl -H "Content-Type: application/json" -X POST -d '{"text": "Hol lakik a télapó? Az északi sarkon!"}' localhost:9090/v1/tokenize
echo "Testing parse endpoint"
curl -H "Content-Type: application/json" -X POST -d '{"text": "Hol lakik a télapó? Az északi sarkon!"}' localhost:9090/v1/parse
docker-build: install
docker build . -t oroszgy/hunlp:$(VERSION)
docker tag oroszgy/hunlp:$(VERSION) oroszgy/hunlp:latest
docker-push: docker-build
docker push oroszgy/hunlp:$(VERSION)
docker push oroszgy/hunlp:latest
python-dist:
cd src/main/python && python setup.py sdist