liamcripwell commited on
Commit
0e4514e
·
1 Parent(s): ec4502b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md CHANGED
@@ -1,3 +1,35 @@
1
  ---
2
  license: mit
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
  ---
6
+
7
+ # sle-base
8
+
9
+ This is model for the SLE metric described in the original paper. It is based on [`roberta-base`](https://huggingface.co/roberta-base) with an added regression head.
10
+
11
+ Install the [python library](https://github.com/liamcripwell/sle).
12
+
13
+ SLE scores can be calculated within python as shown in the example below.
14
+
15
+ For a raw estimation of a sentence's simplicity, use `'sle'`, but to evaluate sentence simplification systems we recommend providing the input sentences and using `'sle_delta'` ($\Delta \text{SLE}$). See the paper for further details.
16
+
17
+
18
+ ```python
19
+ from sle.scorer import SLEScorer
20
+
21
+ scorer = SLEScorer("liamcripwell/sle-base")
22
+
23
+ texts = [
24
+ "Here is a simple sentence.",
25
+ "Here is an additional sentence that makes use of more complex terminology."
26
+ ]
27
+
28
+ # raw simplicity estimates
29
+ results = scorer.score(texts)
30
+ print(results) # {'sle': [3.9842946529388428, 0.5840105414390564]}
31
+
32
+ # delta from input sentences
33
+ results = scorer.score([texts[0]], inputs=[texts[1]])
34
+ print(results) # {'sle': [3.9842941761016846], 'sle_delta': [3.4002838730812073]}
35
+ ```