Giter Site home page Giter Site logo

nus-cs3244-ml-singapore-7 / sg-parliament-hansard-nlp-demo Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 15.63 MB

Singapore Hansard NLP Demo

Home Page: https://share.streamlit.io/nus-cs3244-ml-singapore-7/sg-parliament-hansard-nlp-demo/app.py

Python 31.83% Jupyter Notebook 68.17%
singapore singapore-government nlp hansard parliamentary-data streamlit python cs3244 nus transformers

sg-parliament-hansard-nlp-demo's Introduction

Singapore Parliament Hansard NLP Demo

Demo website for for CS3244 Machine Learning Project (AY20/21 Semester 2).

About

The project was to perform analysis of Singpore's parliamentary hansard using NLP. We trained and ran Transformer models on the Singapore Parliament Hansard to perform sentiment analysis, name-entity recognition and summarisation, taking advantage of transfer learning via pre-trained models.

The models were used to analyse the Hansard of recent years to uncover interesting findings on speakers and entities by sentiment. The findings can be found on the demo website.

Project Report

The project report can be found here.

Data

The data for training and analysed was scraped from the Singapore Parliament website for all sessions from September 2012 to March 2021, giving about a decade worth of information and spanning three sessions of Parliament. The data can be found here.

Model Training

The trained models along with the code and results for model training can be found here.

This notebook can be used to get a quick overview of the NLP tasks using Hugging Face Transformers library: Open In Colab

Deployment

  • The models for sentiment analysis and name-entity recognition were deployed on Google cloud run using FastAPI and Docker. Deployment code and details can be found here.
  • The demo website was deployed using Streamlit. Instructions for setting up the website locally are given below.

Running Locally

  1. Clone the repo and navigate to the correct folder
git clone https://github.com/nus-cs3244-ml-singapore-7/NER-demo.git
cd NER-demo
  1. Create a virtual environment
pip install virtualenv #Run this if you don't have virtualenv installed
virtualenv env
  1. Activate the virtual environment
env\Scripts\activate #Windows
source env/lib/activate #Mac/Linux
  1. Install the project requirements
pip install -r requirements.txt
  1. Run streamlit run app.py
  2. Visit localhost:8501 to view the app

Built With

Team

sg-parliament-hansard-nlp-demo's People

Contributors

noelmathewisaac avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.