Skip to content

Fine tunning BERT for Japanese Sentiment Classification

Notifications You must be signed in to change notification settings

jarvisx17/Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Japanese Sentiment Analysis with BERT

image

This repository contains a Jupyter Notebook (Japanese_Sentiment_bert.ipynb) dedicated to performing sentiment analysis for Japanese text. The project focuses on classifying Japanese text into positive and negative sentiments using the BERT model, specifically fine-tuned on the CHABSA Japanese news article dataset. The notebook also utilizes the Hugging Face transformers library, including the Trainer class for efficient model training.

Project Overview

Sentiment analysis, or opinion mining, is a natural language processing (NLP) task that involves determining the sentiment expressed in a piece of text, such as positive, negative, or neutral. In this project, we concentrate on Japanese text sentiment analysis, which has applications in understanding public opinion, customer feedback analysis, and more.

Key Components

  1. Data Preparation: The notebook covers data preprocessing steps to make the CHABSA dataset suitable for sentiment analysis. It includes data loading, cleaning, and labeling.

  2. BERT Model Fine-tuning: The project fine-tunes a pre-trained BERT model on the sentiment classification task using the Hugging Face transformers library. This step involves model configuration, tokenization, and training.

  3. Training with the Trainer Class: The Hugging Face Trainer class streamlines the training process, enabling efficient model training with training loops and evaluation.

  4. Inference and Evaluation: The notebook demonstrates how to use the fine-tuned model for sentiment analysis on new Japanese text data and evaluates its performance.

  5. Deployment and Application: While not covered in the notebook, the trained model can be deployed and used for real-world sentiment analysis tasks.

Getting Started

To explore this project and perform Japanese sentiment analysis using BERT, follow these steps:

  1. Clone this repository to your local machine.

  2. Open the Jupyter Notebook Japanese_Sentiment_bert.ipynb in your preferred Python environment.

  3. Follow the instructions and code within the notebook to train the sentiment analysis model, evaluate its performance, and use it for sentiment classification.

Dependencies

This project relies on the following libraries and tools:

  • Python 3.x
  • Jupyter Notebook
  • PyTorch
  • Hugging Face transformers library
  • CHABSA Japanese news article dataset (data not included in the repository)

Ensure you have these dependencies installed and access to the dataset for model training.

License

This project is licensed under the MIT License.

Acknowledgments

We acknowledge the contributions of Hugging Face for providing the transformers library and the creators of the CHABSA dataset. Their work has been instrumental in making this project possible.


Feel free to explore the provided Jupyter Notebook to delve into Japanese sentiment analysis using BERT. If you have any questions or encounter any issues, please don't hesitate to reach out to the project maintainers.

About

Fine tunning BERT for Japanese Sentiment Classification

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published