Skip to content
Server for whowrotethis.com
HTML Python JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Who Wrote This Server

Simple Python-based Flask application which, serving a web-based tool, allows users to search for "prototypical articles" published by a news agency though the method described in "Machine Learning Techniques for Detecting Identifying Linguistic Patterns in the News Media" by A Samuel Pottinger.


Purpose

This tiny web application uses an inverted index, allowing users to query a dataset for articles most like their publishing agency. For example, it can provide the most NPR-like NPR articles across all topics or the most CNN-like articles about climate change. The user can do this by providing optional search queries through a web-based UI to review coverage of a topic across many different media outlets.


Environment Setup

This application requires Python 3 and pip. Other dependencies can be installed via $ pip install -r requirements.txt. If using telemetry, provide the following env vars:

  • TELEMETRY_DB_URL
  • TELEMETRY_DB_USERNAME
  • TELEMETRY_DB_PASSWORD
  • TELEMETRY_DB_NAME
  • TELEMETRY_DB_PORT

Usage

The application is deployed publicly to https://whowrotethis.com. The application serves a UI for users at the root URL. Running locally, users can simply run $ python application.py and navigate to the URL printed.


Test

Automated tests are provided using the Python-standard unittest library. Users can execute via $ nosetests.


Development Standards

Please unit test and follow the Google Python Style Guide where possible.


Related Projects

Note that this is in a series of related projects as linked:


Open Source

This application's Python and JavaScript source is released under the MIT License. All other contents including the predictions.csv, who_wrote_this_data.zip, and HTML files are released under CC BY-NC 4.0. The following libraries are used:

Used configuration file from AWS docs under Apache v2 license.

You can’t perform that action at this time.