From be89bffdab53613243884a52f76105299ed7b541 Mon Sep 17 00:00:00 2001 From: Toby Batch Date: Tue, 6 Jun 2017 10:45:34 +0100 Subject: [PATCH 1/2] Added requirement for pandas --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index c8053bd..fa5da93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ dill flask flask-cors matplotlib +pandas From 9aa0df3e0ccacf4137b5ffeddd9294a2967e200c Mon Sep 17 00:00:00 2001 From: Toby Batch Date: Tue, 6 Jun 2017 10:57:01 +0100 Subject: [PATCH 2/2] Added nltk to install scripts/readme --- README.md | 60 +++++++++++++++++++++++++++++----------------------- bootstrap.sh | 6 +++++- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6820dde..845e6f7 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # AGROVOC autocoder -This Open-Ag auto-classification model is a product of +This Open-Ag auto-classification model is a product of [Foundation Center](http://foundationcenter.org/). It was developed -by Dave Hollander (dfh@foundationcenter.org) and Bereketab Lakew +by Dave Hollander (dfh@foundationcenter.org) and Bereketab Lakew (bkl@foundationcenter.org). This project uses Python 3.5.x in order to handle all -UTF-8 encoding issues. +UTF-8 encoding issues. -Training data for this model was obtained from +Training data for this model was obtained from [Food and Agriculture Organization of the United Nations](http://agris.fao.org/agris-search/index.do). The predictions are available for free via the `/text/ag_classification` REST API endpoint at [apibeta.foundationcenter.org](https://apibeta.foundationcenter.org/docs/v2.0/documentation.html#/README). -If you wish to host the model locally, the pre-trained models can be -[downloaded](https://s3.amazonaws.com/fc-public/svm/open_ag_models.zip), and +If you wish to host the model locally, the pre-trained models can be +[downloaded](https://s3.amazonaws.com/fc-public/svm/open_ag_models.zip), and should be stored in `src\model\clf_data\`. They can be served using the Flask server included in this project. @@ -26,10 +26,10 @@ supported in Windows): On Ubuntu: ./bootstrap.sh - + This will install Anaconda with Python 3, which includes dependent -libraries such as scikit-learn. - +libraries such as scikit-learn. + On MacOS: brew install qt @@ -37,24 +37,30 @@ On MacOS: pip3 install -U numpy scipy scikit-learn pip3 install -r requirements.txt - + If you already have Python 3, scikit-learn, NumPy and SciPy install you will only need to do pip install -r requirements.txt +You will also need to gect the nltk corpora data: + + python - <