This project follows a SaaS architecture for providing analytical services to two different stakeholders. Offers to restaurant owners a tool for getting an analysis of the social opinion of their business. And provides to citizens a tool for letting them know about the restaurant ratings on their surroundings.
For achieving this, social networks data, an other available Open Data sources on the Web are queried. Multi-language user opinions and other unstructured data about the products and services of a restaurant business are obtained and processed through different semantic analysis techniques. The data is stored as a new graph model which is adapted to the channel of the stakeholder.
- Neo4j
- Python 3.x
- Python
VirtualEnv
- Create a virtual environment for installing and executing the application:
$ virtualenv -p /usr/local/bin/python3 venv
- Create a
load_config.sh
file from the templateload_config_sh.dist
and fill the variables with your development credentials.
3 Load the virtual environment and set variables:
$ source venv/bin/activate
$ source bin/load_config.sh
- Install the libraries from the
requirements.txt
file:
$ pip3 install -r requirements.txt
- Execute
main.py
file.
All variables of the bin/load_config.sh.dist
file have to be set up in the server. Furthermore,
Textblob corpora has to be downloaded, as the bin/install_textblob_corpora
file suggests.
$ git push heroku master
Before executing the tests, some information will be loaded into the database. So, do not launch the tests on a production server because it could lead to data loss.
## Stop database
$ brew services stop neo4j
## Prepare environment
$ rm -r $NEO4J_HOME/libexec/data/databases/<DB_NAME>
$ neo4j-admin load --from=test/test_database.backup --database=<DB_NAME>
## Start database
$ brew services start neo4j
## Launch tests
$ python tests.py -v
The Integration Tests can be executed along with a code coverage test. The following commands will execute the integration tests. After that, a report with the code coverage of the application will be shown.
$ coverage run tests.py -v
$ coverage html
Jagoba P. G. [email protected] | https://jagobapg.eu