/concon-front-end

Repository to store website files.

Primary LanguageTSQL

ConCon

This is the frontEnd of the project whose purpose is to identify norm conflicts using deep learning. At the moment we use a two-phase approach that uses traditional machine learning together with deep learning to extract and compare norms in order to identify conflicts between them.

Demo

http://lsa.pucrs.br/concon

Dependencies

Below we list the dependencies, which we recommend to be installed within a virtual env

  • Django
  • Python 2.7.12
  • Mysql
  • pypandoc
  • scikit-learn
  • numpy
  • scipy
  • nltk
  • six
  • keras
    • theano
    • pyyaml [have to have six, numpy and scipy, and keras will download this theano ans pyyaml for you as well]
  • upgrade tensorflow
    • TensorFlow is the backend, upgrading it will download protobuf, pbr, funcsigs, mock, werkzeug and tensorflow  * If you get the following error Resource u'tokenizers/punkt/english.pickle' not found. Please  use the NLTK Downloader to obtain the missing resource  nltk.download()

   * -->Do : python -m nltk.downloader punkt     * -->Do : python -m nltk.downloader wordnet     * -->Do : python -m nltk.downloader averaged_perceptron_tagger     * -->pip install h5py
* -->pip install keras --upgrade

  • pdfminer.six [will run setup.py bdist_wheel for pycrypto and built pdfminer.six and pycrypto]
  • HomeBrew -->If in MacOs

Installation of dependencies

  • We reccomend to run the project with a virtual env

OS X & Linux:

cd ~/project_directory && virtualenv env && source env/bin/activate && pip install django && pip install mysql-python && pip install pypandoc && pip install -U scikit-learn && sudo pip install numpy && sudo pip install -U nltk  && sudo pip install keras && pip install --upgrade tensorflow  && sudo python -m nltk.downloader punkt  && pip install h5py && sudo pip install keras --upgrade && pip install pdfminer.six

Windows:

Why would anyone use Windows?

Usage

$ cd ~/project_directory/conconexp
$ python manage.py runserver  
  • All set! Go to localhost:8000 and Django should be running locally!

Possible issues that you will have and how to fix them

You will have to modify the values of 'USER' and 'PASSWORD' of 'DATABASES' dictonary


  • In the archive settings.py, who is at '/conconexp/conconexp' set the user and password to your localBase;
    • For example, you can change to:
      DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.mysql',
              'NAME': 'concon',
              'USER': 'root',
              'PASSWORD': '',
              'HOST': 'localhost',
              'PORT': '',
          }
      }
      

Login/logout issues


  • Two alterations have to be done to not to have issues when redirect in login/logout due to differences between the root path of the website and the root local path of the website:
    • Login: go to
'/conconexp/conconexp/settings.py' 

and change the variable LOGIN_REDIRECT_URL to just '/', removing the 'conconexp' of it;

  • Logout: go to
'/conconexp/conconexp/urls.py' 

and you have to modify the definition of url to logout. It's a 'url' function(in the third argument exist a dictionary with a 'next_page' ke. You have to modify the value of '/conconexp' to '/' as in the login.

Load dump


  • You have to download the last dump in your local database, so, enter in mysql:
'mysql -u root -p' 

and, once inside mysql;

'\. path_to/dump'

Configuring Apache + WSGI


Follow the instructions on this link.

NLTK data Folder


If the nltk.download error persists, nltk_data must be placed at /var/www/.

License

Design of the page is free for personal and commercial use under the CCA 3.0 license HTML5 UP