Update README.md
Browse files
README.md
CHANGED
@@ -15,28 +15,28 @@ pip install lens-metric
|
|
15 |
```
|
16 |
|
17 |
```python
|
18 |
-
from lens import download_model
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
]
|
37 |
-
)
|
38 |
```
|
39 |
|
|
|
|
|
40 |
## Intended uses
|
41 |
This model is for reference-based text simplification evaluation, for a model requiring no references, please see [**LENS-SALSA**](https://huggingface.co/davidheineman/lens-salsa).
|
42 |
|
|
|
15 |
```
|
16 |
|
17 |
```python
|
18 |
+
from lens import download_model, LENS
|
19 |
+
|
20 |
+
lens_path = download_model("davidheineman/lens")
|
21 |
+
lens = LENS(lens_path, rescale=True)
|
22 |
+
|
23 |
+
complex = [
|
24 |
+
"They are culturally akin to the coastal peoples of Papua New Guinea."
|
25 |
+
]
|
26 |
+
simple = [
|
27 |
+
"They are culturally similar to the people of Papua New Guinea."
|
28 |
+
]
|
29 |
+
references = [[
|
30 |
+
"They are culturally similar to the coastal peoples of Papua New Guinea.",
|
31 |
+
"They are similar to the Papua New Guinea people living on the coast."
|
32 |
+
]]
|
33 |
+
|
34 |
+
scores = lens.score(complex, simple, references, batch_size=8, devices=[0])
|
35 |
+
print(scores) # [78.6344531130125]
|
|
|
|
|
36 |
```
|
37 |
|
38 |
+
For an example, please see the [quick demo Google Collab notebook](https://colab.research.google.com/drive/1rIYrbl5xzL5b5sGUQ6zFBfwlkyIDg12O?usp=sharing).
|
39 |
+
|
40 |
## Intended uses
|
41 |
This model is for reference-based text simplification evaluation, for a model requiring no references, please see [**LENS-SALSA**](https://huggingface.co/davidheineman/lens-salsa).
|
42 |
|