Prabin Bhandari commited on
Commit
1d4befc
·
1 Parent(s): e0ee438

Update readme

Browse files
Files changed (1) hide show
  1. README.md +20 -25
README.md CHANGED
@@ -14,37 +14,32 @@ pinned: false
14
 
15
  # Measurement Card for Cooccurrence Count
16
 
17
- ***Module Card Instructions:*** *Fill out the following subsections. Feel free to take a look at existing measurement cards if you'd like examples.*
18
-
19
  ## Measurement Description
20
- *Give a brief overview of this measurement, including what task(s) it is usually used for, if any.*
21
 
22
  ## How to Use
23
- *Give general statement of how to use the measurement*
24
-
25
- *Provide simplest possible example for using the measurement*
 
 
 
 
26
 
27
  ### Inputs
28
- *List all input arguments in the format below*
29
- - **input_field** *(type): Definition of input, with explanation if necessary. State any default value(s).*
 
30
 
31
  ### Output Values
32
-
33
- *Explain what this measurement outputs and provide an example of what the measurement output looks like. Modules should return a dictionary with one or multiple key-value pairs, e.g. {"bleu" : 6.02}*
34
-
35
- *State the range of possible values that the measurement's output can take, as well as what in that range is considered good. For example: "This measurement can take on any value between 0 and 100, inclusive. Higher scores are better."*
36
-
37
- #### Values from Popular Papers
38
- *Give examples, preferrably with links to leaderboards or publications, to papers that have reported this measurement, along with the values they have reported.*
39
 
40
  ### Examples
41
- *Give code examples of the measurement being used. Try to include examples that clear up any potential ambiguity left from the measurement description above. If possible, provide a range of examples that show both typical and atypical results, as well as examples where a variety of input parameters are passed.*
42
-
43
- ## Limitations and Bias
44
- *Note any known limitations or biases that the measurement has, with links and references if possible.*
45
-
46
- ## Citation
47
- *Cite the source where this measurement was introduced.*
48
-
49
- ## Further References
50
- *Add any useful further references.*
 
14
 
15
  # Measurement Card for Cooccurrence Count
16
 
 
 
17
  ## Measurement Description
18
+ The `cooccurence_count` measurement returns the total count of sentences in data and the co-occurrence count of the two words passed
19
 
20
  ## How to Use
21
+ This measuresment requires a list of strings as input data along with two strings as word1 and word2
22
+ ```python
23
+ >>> data = ["hello sun","hello moon", "hello sun"]
24
+ >>> c_count = evaluate.load("prb977/cooccurrence_count")
25
+ >>> results = c_count.compute(references=data, word1='hello', word2='sun')
26
+ >>>
27
+ ```
28
 
29
  ### Inputs
30
+ - **data** (list of `str`): The input list of strings
31
+ - **word1** (`str`): The first word
32
+ - **word2** (`str`): The second word
33
 
34
  ### Output Values
35
+ - **count** (`int`): The total count of sentences in data.
36
+ - **co_occurrence_count** (`int`): The count of co-occurrence of word1 and word2 in the sentences of data.
 
 
 
 
 
37
 
38
  ### Examples
39
+ ```python
40
+ >>> data = ["hello sun","hello moon", "hello sun"]
41
+ >>> c_count = evaluate.load("prb977/cooccurrence_count")
42
+ >>> results = c_count.compute(references=data, word1='hello', word2='sun')
43
+ >>> print(results)
44
+ {'count': 3, 'co_occurrence_count': 2}
45
+ ```