Spaces:
Build error
Build error
Update first example.
Browse files
README.md
CHANGED
@@ -41,13 +41,9 @@ pip install vendi_score[all]
|
|
41 |
```
|
42 |
To calculate the score, pass a list of samples and a similarity function or a string identifying a predefined class of similarity functions (see below).
|
43 |
```
|
44 |
-
>>> vendiscore = evaluate.load("Vertaix/vendiscore")
|
45 |
-
>>>
|
46 |
-
|
47 |
-
"See Spot run.",
|
48 |
-
"Run, Spot, run.",
|
49 |
-
"Jane sees Spot run."]
|
50 |
-
>>> results = vendiscore.compute(samples=samples, k="ngram_overlap", ns=[1, 2])
|
51 |
>>> print(results)
|
52 |
{'VS': 3.90657...}
|
53 |
```
|
|
|
41 |
```
|
42 |
To calculate the score, pass a list of samples and a similarity function or a string identifying a predefined class of similarity functions (see below).
|
43 |
```
|
44 |
+
>>> vendiscore = evaluate.load("Vertaix/vendiscore", "text")
|
45 |
+
>>> sents = ["Look, Jane.", "See Spot.", "See Spot run.", "Run, Spot, run.", "Jane sees Spot run."]
|
46 |
+
>>> results = vendiscore.compute(samples=sents, k="ngram_overlap", ns=[1, 2])
|
|
|
|
|
|
|
|
|
47 |
>>> print(results)
|
48 |
{'VS': 3.90657...}
|
49 |
```
|