|
--- |
|
language: |
|
- en |
|
pipeline_tag: text-classification |
|
--- |
|
# English classification model to detect texts from the political science domain |
|
|
|
Accuracy: 0.9 |
|
|
|
Predicts 2 classes: |
|
| class |description| precision | recall | f1-score | support | |
|
|:------|:------------|:------------|:---------|:-----------|:----------| |
|
| multi | other scientific domains| 0.911 | 0.899 | 0.905 | 513 | |
|
| politics | political science| 0.889 | 0.902 | 0.895 | 460 | |
|
|
|
Based on [SSCI-SciBERT](https://link.springer.com/article/10.1007/s11192-022-04602-4) |
|
|
|
The model was fine-tuned using a dataset of 2,919 abstracts from scientific articles retrieved from the [BASE](https://www.base-search.net/) and [POLLUX](https://www.pollux-fid.de/) collections of scientific articles. |
|
The BASE data were labelled as "politics" or "multi" according to the Dewey Decimal Classification (DDC). Data from several major political science journals in the POLLUX dataset were marked as "politics" class. |
|
|
|
# Usage |
|
|
|
Requires: [transformers](https://huggingface.co/docs/transformers/index) (pip install transformers) |
|
|
|
```python |
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
from transformers import pipeline |
|
|
|
tokenizer = AutoTokenizer.from_pretrained('kalawinka/SSciBERT_politics') |
|
model = AutoModelForSequenceClassification.from_pretrained('kalawinka/SSciBERT_politics') |
|
pipe = pipeline("text-classification", model=model, tokenizer = tokenizer, max_length=512) |
|
|
|
pipe('Linguistic Intervention in Making Fiscal and Monetary Policy. Linguistics is a branch of science that can maneuver to solve various problems. Linguistics began to succeed in canceling the predicate given to laypeople, namely as a linguistic science. Linguistics can even be a solution for various other disciplines, including fiscal and monetary policy issues. Fiscal and monetary policies that require analysis of the past, present, and future phenomena can be answered immediately with a linguistic analysis knife. Critical discourse analysis is confidently taking action as a solution to this problem. The holistic interpretative approach used in this study tries to analyze the text by relating and relevant to the context and then abstracting it into a complete picture. This study succeeded in finding that critical discourse analysis can play a role in 3 things related to fiscal and monetary policy, namely: (1) text analysis is an analysis of linguistic elements in sentence construction used in formulating policies, (2) analysis of discourse practice is a background analysis behind the decision-makers who formulate policies and other situations and conditions behind the birth of business economic policies, and (3) analysis of socio-cultural and political is an analysis that is identifying the changes that occur as a result of these policies. This proves the effectiveness of Linguistics in studying fiscal and monetary policy issues.') |
|
``` |
|
This produces the following output: |
|
|
|
``` |
|
[{'label': 'multi', 'score': 0.9990800619125366}] |
|
``` |
|
|
|
|