kalawinka commited on
Commit
524f039
1 Parent(s): 7267ec6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -1
README.md CHANGED
@@ -2,4 +2,39 @@
2
  language:
3
  - en
4
  pipeline_tag: text-classification
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  language:
3
  - en
4
  pipeline_tag: text-classification
5
+ ---
6
+ # English classification model to detect texts from the political science domain
7
+
8
+ Accuracy: 0.897
9
+
10
+ Predicts 2 classes:
11
+ | class |description| precision | recall | f1-score | support |
12
+ |:------|:------------|:------------|:---------|:-----------|:----------|
13
+ | multi | other scientific domains| 0.908911 | 0.894737 | 0.901768 | 513 |
14
+ | politics | political science| 0.884615 | 0.9 | 0.892241 | 460 |
15
+
16
+ Based on [SSCI-SciBERT](https://link.springer.com/article/10.1007/s11192-022-04602-4)
17
+
18
+ The model was fine-tuned using a dataset of 3,892 abstracts from scientific articles retrieved from the [BASE](https://www.base-search.net/) and [POLLUX](https://www.pollux-fid.de/) collections of scientific articles.
19
+ 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.
20
+
21
+ # Usage
22
+
23
+ Requires: [transformers](https://huggingface.co/docs/transformers/index) (pip install transformers)
24
+
25
+ ```python
26
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
27
+ from transformers import pipeline
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained('kalawinka/SSciBERT_politics')
30
+ model = AutoModelForSequenceClassification.from_pretrained('kalawinka/SSciBERT_politics')
31
+ pipe = pipeline("text-classification", model=model, tokenizer = tokenizer, max_length=512)
32
+
33
+ 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.')
34
+ ```
35
+ This produces the following output:
36
+
37
+ ```
38
+ [{'label': 'multi', 'score': 0.9990800619125366}]
39
+ ```
40
+