Skip to content

The Public Safety Reporting System (PSRS) is a prototype web application that parses police blotters from unstructured PDF sources, applies editorial logic to the data to help journalists identify and select relevant incidents.

License

Notifications You must be signed in to change notification settings

associatedpress/local-ai-brainerd-dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


AP Logo

Public Safety Reporting System

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

The Public Safety Reporting System (PSRS) is a prototype web application that parses police blotters from unstructured PDF sources, applies editorial logic to the data to help journalists identify and select relevant incidents, and transmits collections of incidents as reports for publication to a commercial automated writing service, which then delivers them as a draft story into the CMS.

This project was originally built for Brainerd Dispatch in Brainerd, Minnesota. The Associated Press and University of Missouri collaborated to develop this application as part of the Local News AI Initiative, funded by the John S. and James L. Knight Foundation, which aims to leverage AI for the benefit of local news.

The development team thanks the staff at Brainerd Dispatch and Forum Communications for proposing this project, and for their participation, feedback, and encouragement. The development team also recognizes the efforts of commercial automated writing vendor Lede AI which built new capabilities to support this police blotter reporting project.

Project Objectives

  • Free Up Time: Automating the production of police blotters to reduce the time burden on journalists so they can report on more complex public safety stories.
  • Allow for Journalist Review: The automation doesn't replace journalists, but it supports them in producing police blotters faster, so they can edit a final version sooner.
  • Cost Effectiveness: Running the system should not incur expenses greater than the savings or revenue gains generated by using it.

How It Operates

PSRS functions through this process:

  1. Upload: The system takes an input of police blotter PDFs generated by public safety agencies. It is uploaded via the web application (see image above).
  2. Parsing: A parser extracts individual incidents from the uploaded PDF and inserts them into the MySQL database.
  3. Incident Selection: The incidents are presented in order of editorial priority, the system awaits a journalist to select incidents for publication (see image below).
  4. Story Generation: The selected incidents are assembled into a report per public safety agency. This process is provided by the commercial automated writing vendor.
  5. Publication: The draft story is uploaded to the CMS via API as a draft story for review by a journalist. This process is provided by the commercial automated writing vendor.

Note: In the second step, the parsers are customized to the format of the police blotters generated by three Minnesota public safety agencies. PSRS is built for flexibility in allowing developers to insert any number of new parsers which can be tied to one or many public safety agencies.

Note: While the fourth and fifth steps are tied to a commercial automated writing vendor, PSRS is built to allow developers flexibility to connect to any automated writing service via API.

(back to top)

Built With

  • Python

  • React

(back to top)

Getting Started

PSRS was originally designed to be hosted on Amazon Web Services. See administrators for installation details.

The backend tech stack is Python with Flask RestAPIs and MySQL database with ORM tool as SQLAlchemy. See backend for details.

The front end is built with React. See front end for details.

Prerequisites

  • MySQL
  • Postman (to access some maintenance features)
  • Lede AI (for automated writing)
  • Amazon Web Services (for production hosting)

(back to top)

Usage

For day-to-day usage, editorial staff should access PSRS via the UI at http://IP_ADDRESS/loginpage

For system maintenance, such as adding or deleting public safety agencies, adding or deleting users, there are a series of Postman scripts available in the postman-scripts folder.

Note: The Postman scripts need to be modified to adjust for urls, usernames, and passwords.

(back to top)

Roadmap

At the end of the MVP development period, these were the features that we thought would be useful to have in the future:

  • Self-service matching feature that allows the user to match detected blotter document fields to database columns. This feature was partially developed, see the notes in backend and front end.
  • The database currently collects all incident reports without any clean-up operations. The collected data can be useful for future data journalism tasks. Data management features will need to be considered, such as an export to CSV function, or perhaps an API link to a data visualization tool.
  • Management features in the UI to eliminate the need for Postman scripts.
  • Outbound connections with other automated writing systems.
  • New parsers to handle a variety of popular blotter formats. (The ideal outcome would be an AI-powered parser that can handle all sorts of police blotter formats.)
  • Improvements in password handling to add random bytes of salt.

(back to top)

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GNU GENERAL PUBLIC LICENSE. See LICENSE for more information.

(back to top)

Contact

The Associated Press does not provide technical support for this open-source application.

Prasad Calyam - calyamp@missouri.edu

Project Link: https://github.com/associatedpress/local-ai-brainerd-dispatch

Original Developers

  • Hemanth Sai - @hemanth5555 - University of Missouri
  • Kiran Neupane - @kngbq - University of Missouri

(back to top)

About

The Public Safety Reporting System (PSRS) is a prototype web application that parses police blotters from unstructured PDF sources, applies editorial logic to the data to help journalists identify and select relevant incidents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published