Giter VIP home page Giter VIP logo

forum-understanding-using-nlp-techniques's Introduction

Forum Understanding Using NLP Techniques

Hardware

  • CPU: AMD 7950X
  • GPU: RTX 2080ti

Enviroment

It's recommand to create a virtual enviroment, e.g. conda.

pip install -r requirements.txt

Download

To download the fine-tuned models for reproducing.

bash download.sh

Reproduce

Train

To preporcess the data and training.

  • Running shell script.
bash train.sh

or

  • And here is how you would use it on your own files, after adjusting the values for the arguments --train_path, --dev_path to match your setup

  • You could also setting different hyperameters by adjusting the values for the arguments --learning_rate , --num_epochs

python3 src/span-aste/train.py \
    --batch_size 1 \
    --learning_rate 5e-5 \
    --weight_decay 1e-2 \
    --warmup_proportion 0.1 \
    --train_path processed_data \
    --dev_path processed_data \
    --ckpt_dir ckpt/span-aste \
    --output_dir output \
    --max_seq_len 256 \
    --num_epochs 70 \
    --seed 2022 \
    --logging_steps 480 \
    --valid_steps 480 \
    # --init_from_ckpt \

Test

  1. Sentiment analysis
  • Running shell script.
bash test.sh

or

  • You could also setting different parameter in --test_path to save the output in other location.
python3 src/span-aste/test.py \
    --test_path processed_data \
    --ckpt ckpt/span-aste \
    --output_dir output \
  1. Topic model
  • Executing .ipynb files in /src/Bertopic
  • Name of the file represent the test data crawl from which topic on Reddit.

forum-understanding-using-nlp-techniques's People

Contributors

rogerjung avatar youxin1231 avatar

Watchers

 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.