-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
50 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 情感分类(sentiment classification) | ||
> 文本情感分类 | ||
## Requirements | ||
|
||
```sh | ||
pip install -r requirements.txt | ||
git clone https://github.com/WangHexie/ktrain.git | ||
cd ktrain && pip install . | ||
``` | ||
|
||
## Usage example | ||
|
||
```shell script | ||
python ./main.py --traning-dataset ./data --prediction-file "./data/test.csv" --test-dataset ./data/test --max_len 80 --model hfl/chinese-roberta-wwm-ext --batch_size 196 | ||
``` | ||
|
||
```shell script | ||
usage: sentiment classification [-h] [--traning-dataset TRANING_DATASET] | ||
[--prediction-file PREDICTION_FILE] | ||
[--test-dataset TEST_DATASET] [--model MODEL] | ||
[--batch_size BATCH_SIZE] [--max_len MAX_LEN] | ||
[--temp_path TEMP_PATH] | ||
[--early_stopping EARLY_STOPPING] | ||
[--reduce_on_plateau REDUCE_ON_PLATEAU] | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
开心,兴奋, | ||
,, | ||
,, | ||
开心,, | ||
,, | ||
焦虑,开心, | ||
,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
大法开机无广告 | ||
"想多了吧如若不强制 等于无效" | ||
"说实话网格员 有点浪费了" | ||
每个女孩节日快乐!!! | ||
我就也点赞了一个 | ||
条件别满足了 | ||
高三初三可以考虑早一点开学 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters