update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1 |
---
|
2 |
license: other
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: other
|
3 |
+
datasets:
|
4 |
+
- taishi-i/awesome-japanese-nlp-classification-dataset
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
- ja
|
8 |
+
metrics:
|
9 |
+
- f1
|
10 |
+
library_name: transformers
|
11 |
+
pipeline_tag: text-classification
|
12 |
---
|
13 |
+
|
14 |
+
# Model overview
|
15 |
+
|
16 |
+
This model is the baseline model for [awesome-japanese-nlp-classification-dataset](https://huggingface.co/datasets/taishi-i/awesome-japanese-nlp-classification-dataset). It was trained on this dataset, saved using the development data, and evaluated using the test data. The following table shows the evaluation results.
|
17 |
+
|
18 |
+
| Label | Precision | Recall | F1-Score | Support |
|
19 |
+
|--------------|-----------|--------|----------|---------|
|
20 |
+
| 0 | 0.98 | 0.99 | 0.98 | 796 |
|
21 |
+
| 1 | 0.79 | 0.70 | **0.74** | 60 |
|
22 |
+
| Accuracy | | | 0.97 | 856 |
|
23 |
+
| Macro Avg | 0.89 | 0.84 | 0.86 | 856 |
|
24 |
+
| Weighted Avg | 0.96 | 0.97 | 0.97 | 856 |
|
25 |
+
|
26 |
+
|
27 |
+
# Usage
|
28 |
+
|
29 |
+
Please install the following library.
|
30 |
+
|
31 |
+
```bash
|
32 |
+
pip install transformers
|
33 |
+
```
|
34 |
+
|
35 |
+
You can easily use a classification model with the pipeline method.
|
36 |
+
|
37 |
+
```python
|
38 |
+
from transformers import pipeline
|
39 |
+
|
40 |
+
pipe = pipeline(
|
41 |
+
"text-classification",
|
42 |
+
model="taishi-i/awesome-japanese-nlp-classification-model",
|
43 |
+
)
|
44 |
+
|
45 |
+
# Relevant sample
|
46 |
+
text = "ディープラーニングによる自然言語処理(共立出版)のサポートページです"
|
47 |
+
label = pipe(text)
|
48 |
+
print(label) # [{'label': '1', 'score': 0.9910495281219482}]
|
49 |
+
|
50 |
+
# Not Relevant sample
|
51 |
+
text = "AIイラストを管理するデスクトップアプリ"
|
52 |
+
label = pipe(text)
|
53 |
+
print(label) # [{'label': '0', 'score': 0.9986791014671326}]
|
54 |
+
```
|
55 |
+
|
56 |
+
# License
|
57 |
+
|
58 |
+
This model was trained from a dataset collected from the GitHub API under [GitHub Acceptable Use Policies - 7. Information Usage Restrictions](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies#7-information-usage-restrictions) and [GitHub Terms of Service - H. API Terms](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#h-api-terms). It should be used solely for research verification purposes. Adhering to GitHub's regulations is mandatory.
|