Skip to content

東大2024年Sセメスター計算機プログラミングのグループワークプロジェクト

Notifications You must be signed in to change notification settings

Yusaku-KASAI/computer-programming-emotion-dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

computer-programming-emotion-dictionary

概要

このプロジェクトは、テキストデータを処理し、感情分析を行うシステムです。以下のモジュールがあります:

ディレクトリ構成

my_project/
├── src/
│   ├── main.py
│   └── my_library/
│       ├── read_file.py
│       ├── load_input_data.py
│       ├── load_dictionary_data.py
│       ├── classify_dictionary_data.py
│       ├── count_word_in_sentence.py
│       ├── predict_polarity.py
│       └── write_file.py
├── data/
│   ├── dictionary1.txt
│   ├── dictionary2.txt
│   ├── data.txt
│   └── result.txt
├── logs/ 
├── tests/
│   ├── test_read_file.py
│   ├── test_load_input_data.py
│   ├── test_load_dictionary_data.py
│   ├── test_classify_dictionary_data.py
│   ├── test_count_word_in_sentence.py
│   ├── test_predict_polarity.py
│   └── test_write_file.py
├── requirements.txt
└── README.md

セットアップ

依存関係のインストール

以下のコマンドを実行して、必要なPythonパッケージをインストールします:

pip install -r requirements.txt

データファイルの準備

data/ディレクトリに以下のファイルを配置してください:

  • dictionary1.txt
  • dictionary2.txt
  • data.txt

使用方法

main.pyの実行

以下のコマンドを実行して、プロジェクトのメインスクリプトを実行します:

python3 src/main.py

このスクリプトは以下の手順で動作します:

  1. 入力データ(data.txt)の読み込み
  2. 辞書データ(dictionary1.txtおよびdictionary2.txt)の読み込み
  3. 辞書データ(dictionary1.txtおよびdictionary2.txt)の調整
  4. 入力データの各文の感情を調整された辞書データから予測
  5. 結果をresult.txtに出力

テスト

プロジェクトにはユニットテストが含まれています。以下のコマンドを実行してテストを実行できます:

python -m unittest discover -s tests

ライセンス

貢献

作者

注意

この`README.md`は、プロジェクトの基本的な情報を提供し、セットアップや使用方法を明確にするためのものです。また、このプロジェクトは未完成です。必要に応じて、プロジェクトの詳細に合わせて修正してください。
現時点ではPythonの外部ライブラリも使用していないので依存関係のインストールを行う必要がありません。
現時点ではユニットテストは作成されていませんので、テストのコマンドを実行してもテストされません。

About

東大2024年Sセメスター計算機プログラミングのグループワークプロジェクト

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages