Update README.md
Browse files
README.md
CHANGED
@@ -16,4 +16,21 @@ Paper: [To Revise or Not to Revise: Learning to Detect Improvable Claims for Arg
|
|
16 |
Authors: Gabriella Skitalinskaya and Henning Wachsmuth
|
17 |
|
18 |
# Claim Improvement Suggestion
|
19 |
-
We cast this task as a multi-class classification task, where the objective is given an argumentative claim and some contextual information (in this case, the parent claim in the debate, which is opposed or supported by the claim in question), select all types of quality issues from a defined set that should be improved when revising the claim.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
Authors: Gabriella Skitalinskaya and Henning Wachsmuth
|
17 |
|
18 |
# Claim Improvement Suggestion
|
19 |
+
We cast this task as a multi-class classification task, where the objective is given an argumentative claim and some contextual information (in this case, the parent claim in the debate, which is opposed or supported by the claim in question), select all types of quality issues from a defined set that should be improved when revising the claim.
|
20 |
+
|
21 |
+
# Usage
|
22 |
+
|
23 |
+
```python
|
24 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
25 |
+
import torch
|
26 |
+
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained("deberta-claim-improvement-suggestion-with-parent-context")
|
28 |
+
model = AutoModelForSequenceClassification.from_pretrained("deberta-claim-improvement-suggestion-with-parent-context")
|
29 |
+
claim = 'Teachers are likely to educate children better than parents.'
|
30 |
+
parent_claim = 'Homeschooling should be banned.'
|
31 |
+
model_input = tokenizer(claim,parent_claim, return_tensors='pt')
|
32 |
+
model_outputs = model(**model_input)
|
33 |
+
|
34 |
+
outputs = torch.nn.functional.softmax(model_outputs.logits, dim = -1)
|
35 |
+
print(outputs)
|
36 |
+
```
|