Giter Club home page Giter Club logo

norwegian_sentiment's Introduction

Document and sentence-level sentiment analysis for Norwegian text.

Information about project you an fine on the website of University of Oslo

For sentence level there are 3 classes:

  • negative
  • neutral
  • positive

For document level we also 3 distinguish classes but with different meaning:

  • negative
  • fair
  • positive

How to fine-tune?


For this run finetune.py and specify required arguments:

  • -level: 'sentence' if you want to use corpora with sentence-level sentiment analysys or 'document' for document-level SA. 'other' if you want to use your own corpora.
  • -model: pre-traied model from huggingface or absolute (!) path to local folder with config (.json) and model (.bin) in case you want to use custom wrapper.

If you want to use custom wrapper instead of huggingface, please specify:
  • -custom_wrapper = True. It's False by default

If you want to use T5 model, please specify:

  • -t5 = True. It's False by default.

There are also additional arguments possible but not required:

  • -data_path: if you want to use your own corpora provide a path to folder with train.csv, dev.csv and test.csv datasets (column 'sentiment' with labels and 'review' with texts). In this case don't forget to specify -level as 'other'. If you want to use NoReC datasets for sentence or document level SA no need to provide a path: datasets will be downloaded from repo for sentence-level SA or repo for document-level SA depending on the level you specified in the first argument. Repos will only be downloaded once, created dataframes will be stored in 'data/documnent/' and 'data/sentence' and will be used in the future experiments (no need to specify this path, script finds it automatically).
  • -lr: 1e-05 by default.
  • -max_length: 512 by default.
  • -warmup: 2 by default.
  • -batch_size: 4 by default.
  • -epochs: 10 by default

norwegian_sentiment's People

Contributors

annapalarkina171 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.