Web Services for the Eventminer ##Manual This manual is tested under Ubuntu 14.04!
##Requirements
- Python 2.7 should be already installed, but make sure with the following command:
python2
- Install the following package:
apt-get install python-virtualenv python-dev
- Create a new directory for the project
mkdir eventminer
- Create a Python Virtual Environment with Python 2 and activate it
virtualenv eventminer --python=python2
cd eventminer
source bin/activate
- Clone the repository including submodules
- Note: The submodule are configured for use with SSH, so configure your access to GitHub: https://help.github.com/articles/generating-ssh-keys
git clone [email protected]:policycompass/eventminer.git
cd eventminer
- Install the Requirements
pip install -r requirements.txt
- Start the application
python flask_file.py run
- Send a POST request to "localhost:5000/extraction" with a body containing JSON. For example:
{ "text" : "The paaring season is normally between May to August."}
Result:
{
"extraction_result" : [
{
"end_day": "",
"end_month": "8",
"end_year": "",
"event": "The paaring seasion is normally between May to August",
"event_found": true,
"event_nr": 1,
"location": "",
"rule_name": "Range: Month_to_Month",
"rule_nr": "9a",
"start_day": "",
"start_month": "5",
"start_year": ""
}
]
}