concord. noun. agreement or harmony between people
Concord is a web application designed to easily crowd source labelling of text data for NLP. It's focus is on labeling text for training text classification models such as in chatbots.
docker run --rm -it -p 3306:3306 -e MYSQL_DATABASE=concorddb -e MYSQL_USER=concorduser -e MYSQL_PASSWORD=concordpwd -e MYSQL_ROOT_PASSWORD=password123 -d mysql:5.7
By default Concord is configured to use a Rasa NLU server for testing. See concord-server/server/src/main/yml/server.yml
docker run -p 5000:5000 rasa/rasa_nlu:latest-full
In a new terminal window:
curl -XPOST --header "Content-Type: application/json" http://localhost:5000/train?project=taxibot -d @testbed/taxibotdata.json
curl http://localhost:5000/status
When status of taxibot model is listed as ready, execute:
curl -XPOST http://localhost:5000/parse -d '{"q":"get me my taxi", "project": "taxibot"}'
NOTE: Wait for this response to return before running other queries against the Rasa NLU server. May take several minutes.
cd concord-server/server
./gradlew createDatabase
cd concord-server/server
./gradlew run
In a new terminal window:
By default Concord is configured to use a list of usernames/passwords held in it's config file. See concord-server/server/src/main/yml/server.yml
curl -v -X POST http://127.0.0.1:9000/api/sessions --header "Content-Type: application/json" --data '{"userId":"Bob","password":"secret"}'
Extract token from response and use in place of XXXXXX
in the following commands.
curl -v -X POST http://127.0.0.1:9000/api/labels/bulk --header "Content-Type: text/csv" --header "Authorization: Bearer XXXXXX" --data-binary '@testbed/labels.csv'
curl -v -X POST http://127.0.0.1:9000/api/phrases/bulk --header "Content-Type: text/csv" --header "Authorization: Bearer XXXXXX" --data-binary '@testbed/unlabelled_phrases.csv'
In a new terminal window:
cd concord-ui/
npm install
cd concord-ui/
npm start
Login as bob, password secret or as alice, password garden
docker exec -it [docker-image-name] bash
mysql -u concorduser -p
password: concordpwd
use concorddb