Coder Social home page Coder Social logo

plp_project's Introduction

PLP_PROJECT

environment requiement

To run this project, you need to install the following libraries

  • pytorch
  • pytorch-pretrained-bert
  • spacy
  • numpy
  • scipy
  • scikit-learn
  • pyyaml
  • adabound
  • xlrd==1.2.0

data requiement

To enable init representation of words, you need to download the glove file from http://nlp.stanford.edu/data/wordvecs/glove.840B.300d.zip, and put the txt file under the 'data' directory.

sentiment analysis model workflow

This project is developed based on capsule network, execute the command 'python run.py' and you will see the results of 'data processing', 'training' and 'testing'.

configuration

To see results from different settings, just modify the 'config.py'.

detailed workflow

  1. Run the 'dataset.py', the laptop review files under the 'laptop_raw_data' directory would be combined and generate 'train/val/test' files under the path 'data/raw/', which are all in 'xml' format, recording the correct aspect terms and the corresponding sentiment labels from each given sentence. Note that train : val : test = 8 : 1 : 1 (see line 64 in 'data_utils/data_transfer.py'). Then it generates 'log' and 'processed' folders under the 'data' path, which would be used in training and testing stages.
  2. Run the 'train.py', which construct model and train the model with 'data/processed/train.xml' and 'data/processed/val.xml'.
  3. Run the 'test.py', which load the checkpoint learned before and output the test results on 'data/processed/test.xml'.

the website url (Welcome to use!)

The website link is the http://plp2022acas.natapp1.cc/index/, we recommend you to visit it on your phone.

plp_project's People

Contributors

yxni98 avatar why-222 avatar yichen-wu-90408 avatar wizounovziki avatar

Watchers

 avatar

Forkers

yichen-wu-90408

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.