Commit fb250238 authored by Sacha's avatar Sacha
Browse files

see diff

parent 9872b333
.. |...| unicode:: U+2026 .. ldots
Running the server locally
~~~~~~~~~~~~~~~~~~~~~~~~~~
These instructions are outdated as of Feb. 2017. Please use the demo until they're updated.
This is not for the faint-hearted.
Please use Python 2.7.x
#. ``$ git clone https://github.com/SXibolet/controversy``
#. ``$ cd controversy/controversy``
#. get an academic SentiStrength license by sending an email to `the address listed here`_, move the ``jar`` and data into ``sentistrength`` with names ``SentiStrengthCom.jar`` and ``data-11`` respectively. You'll need to be in academia to get a free license.
#. ``$ mv config.py.default config.py``, and change credentials where marked as ``REQUIRED``. You'll need to register for NYTimes' `Article Search`_ and `Community`_ APIs and `Twitter's API`_.
#. create a MySQL database called "controversy" with ``source schema.sql``.
#. install MongoDB and start the server with the default port. Leave with ``<Ctrl>+C`` only if on Debian/Ubuntu. Otherwise, keep ``sudo mongod`` open, and continue in a new shell. NoSQL is ideal for how we do training. We'll soon create a simple way of downloading our data, which, once downloaded, can be loaded into MongoDB with a script we'll also make shortly |...|
#. install redis, run ``redis-server``. Leave with ``<Ctrl>+C`` only if on Debian/Ubuntu. Otherwise, keep ``redis-server`` open, and continue in a new shell.
#. satisfy SciPy `dependencies`_
#. ``$ pip install virtualenv``
#. ``$ virtualenv venv``
#. ``$ . venv/bin/activate``
#. ``$ pip install -r requirements.txt`` will install requirements into the virtual environment to limit bloat on your actual machine.
#. ``$ python``
- ``>>> import nltk``
- ``>>> nltk.download('stopwords', 'punkt')``
- ``<Ctrl>+D``
#. ``$ python app.py``
#. navigate to ``localhost:4040`` in your browser. See `API spec`_ for routes.
.. _API spec: https://controversy.2pitau.org/spec
.. _dependencies: http://www.scipy.org/install.html
.. _Article Search: http://developer.nytimes.com/apps/mykeys
.. _Community: http://developer.nytimes.com/apps/mykeys
.. _Twitter's API: https://apps.twitter.com/
.. _the address listed here: http://sentistrength.wlv.ac.uk
......@@ -71,11 +71,11 @@
<h2 name='bugs' id='bugs'>About / Bugs</h2>
<p>This is <span class='logo'>CONTROVERSY</span>, available <a target='_blank' href='http://github.com/SXibolet/controversy'>on GitHub</a>.</p>
<p>This is <span class='logo'>CONTROVERSY</span>, available <a target='_blank' href='http://framagit.org/gdyer/CONTROVERSY'>on Framagit</a>.</p>
<p>We encrypt passwords with a one-way hash. As of fall 2015, we force SSL as you browse the site.</p>
<p>We'd like to thank the NSF and NIH for supporting this work.</p>
<div>
<p>Found a bug? <a target='_blank' href='https://github.com/SXibolet/controversy/issues/new'>Please file a report</a>.</p>
<p>Found a bug? <a target='_blank' href='https://framagit.org/gdyer/CONTROVERSY/issues/new'>Please file a report</a>.</p>
<ul ng-controller='IssuesController' class='issues_list'>
Known problems &hellip;
{% raw %}
......
......@@ -5,7 +5,7 @@
<p class='lead'><b>HITS completed</b></p>
</div>
<div class='col-md-8'>
<p>All articles in our training set have been annotated. Thank you for your interest. <a href='https://github.com/gdyer/controversy'>Learn more about this project</a>.</p>
<p>All articles in our training set have been annotated. Thank you for your interest. <a href='https://framagit.org/gdyer/CONTROVERSY'>Learn more about this project</a>.</p>
</div>
</div>
{% endblock %}
......@@ -5,7 +5,7 @@
<p class="lead"><b>You've completed this article &hellip; thanks!</b></p>
</div>
<div class='col-md-8'>
<p>Report feedback to us at <b><tt>postmaster</tt>@<tt>2pitau</tt>.<tt>org</tt></b> or <a href='https://github.com/SXibolet/CONTROVERSY'>learn more about this project</a>.</p>
<p>Report feedback to us at <b><tt>gdyer2</tt>@<tt>illinois</tt>.<tt>edu</tt></b> or <a href='https://github.com/SXibolet/CONTROVERSY'>learn more about this project</a>.</p>
</div>
</div>
{% endblock %}
......@@ -44,13 +44,13 @@ function dismiss_error() {
<span class='logo'>CONTROVERSY</span> seeks to build computational techniques to evaluate the controversy of news articles.
<a href='training'>Annotate articles</a> to help us build a dataset for future study!
<center>
<a href='https://github.com/SXibolet/controversy'>&star; on GitHub</a>
<a href='https://framagit.org/gdyer/CONTROVERSY'>&star; on Framagit</a>
&middot;
<a href='./register'>register an account</a>
</center>
<hr>
</span>
<p><noscript><span class='logo'>CONTROVERSY</span> <i>requires JavaScript. We&rsquo;re not doing anything fishy: the project is free (as in freedom) software, and you may view the source files here: <a href='https://github.com/SXibolet/controversy' target='_blank'>https://github.com/SXibolet/controversy</a></i></noscript></p>
<p><noscript><span class='logo'>CONTROVERSY</span> <i>requires JavaScript. We&rsquo;re not doing anything fishy: the project is free (as in freedom) software, and you may view the source files here: <a href='https://framagit.org/gdyer/CONTROVERSY' target='_blank'>https://framagit.org/gdyer/CONTROVERSY</a></i></noscript></p>
<form method='POST'>
{{ form.hidden_tag() }}
{{ form.email(value=username, type="email", class_="field", placeholder="email (username)", required="required") }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment