Git Product home page Git Product logo

lihkg_post_nlp's Introduction

What the code does?

Given a LiHKG Post title, predict which sub-forum it is from.

In [67]: predict_cat("Annual Dinner 抽中左Dyson 風筒,HR打黎話要收返")

14 上班台 0.70
31 創意台 0.15
 1 吹水台 0.12
30 感情台 0.04
 5 時事台 0.02

This repo accompanies the sharing given in https://www.meetup.com/Deep-Learning-HK/events/259092661/

How to run the notebooks

  1. Run pip install -r requirements.txt to install allenNLP and pytorch

  2. Download BERT pretrained weight and vocab to folder pretrain from

    https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-multilingual-cased.tar.gz

    https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-multilingual-cased-vocab.txt

  3. Download BERT finetuned (with LiHKG post) weight to folder chkpoint from

    https://drive.google.com/file/d/1kmx1CZq0RSFelpVKF6Fb05oRFdN8kQdg/view?usp=sharing

  4. run the notebook code/bert_text_classification_lihkg.ipynb

Acknowledgement

This repo borrows a lot from

https://mlexplained.com/2019/01/30/an-in-depth-tutorial-to-allennlp-from-basics-to-elmo-and-bert/#more-853

lihkg_post_nlp's People

Contributors

ylchan87 avatar

Watchers

James Cloos 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.