davidheineman commited on
Commit
7af4189
·
verified ·
1 Parent(s): d021ad7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -20
README.md CHANGED
@@ -15,28 +15,28 @@ pip install lens-metric
15
  ```
16
 
17
  ```python
18
- from lens import download_model
19
- from lens.lens_score import LENS
20
-
21
- model_path = download_model("davidheineman/lens")
22
- lens = LENS(model_path)
23
-
24
- score = lens.score(
25
- complex = [
26
- "They are culturally akin to the coastal peoples of Papua New Guinea."
27
- ],
28
- simple = [
29
- "They are culturally similar to the people of Papua New Guinea."
30
- ],
31
- references = [
32
- [
33
- "They are culturally similar to the coastal peoples of Papua New Guinea.",
34
- "They are similar to the Papua New Guinea people living on the coast."
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