lsy641 commited on
Commit
560c74a
1 Parent(s): f15bebe

update README

Browse files
Files changed (1) hide show
  1. README.md +57 -5
README.md CHANGED
@@ -26,7 +26,11 @@ pinned: false
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
 
@@ -35,16 +39,64 @@ pinned: false
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.*
 
26
 
27
  ### Inputs
28
  *List all input arguments in the format below*
29
+ - **predictions** *(list of strings): list of sentences to test diversity. Each prediction should be a string.*
30
+ - **mode** *(string): 'Expectation-Adjusted-Distinct' or 'Distinct' for diversity calculationg. If the value is 'Expectation-Adjusted-Distinct', the scores of the both modes will be returned. Default value is 'Expectation-Adjusted-Distinct'*
31
+ - **vocab_size** *(int): vocab_size for calculating 'Expectation-Adjusted-Distinct'. When calculating 'Expectation-Adjusted-Distinct', either vocab_size or dataForVocabCal should not be None. Default value is None*
32
+ - **dataForVocabCal** *(list of string): dataForVocabCal for calculating the vocab_size for 'Expectation-Adjusted-Distinct'. Typically, it should be a list of sentences consisting the task dataset. When calculating 'Expectation-Adjusted-Distinct', either vocab_size or dataForVocabCal should not be None. Default value is None*
33
+ - **tokenizer** *(string or tokenizer class): tokenizer for splitting sentences into words. Default value is "white_space". NLTK tokenizer is available.*
34
 
35
  ### Output Values
36
 
 
39
  *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."*
40
 
41
  #### Values from Popular Papers
42
+ The [Expectation-Adjusted-Distinct paper](https://aclanthology.org/2022.acl-short.86) (Liu and Sabour et al. 2022) compares Expectation-Adjusted-Distinct scores of ten different methods with the original Distinct. These scores get higher human correlation from 0.56 to 0.65.
43
 
44
  ### Examples
45
+ Example of calculate Expectation-Adjusted-Distinct byy giving voab_size or data for calculating vocab_size. This will also return Distinct-1,2,and 3.
46
+ ```python
47
+ >>> my_new_module = evaluate.load("lsy641/distinct")
48
+ >>> results = my_new_module.compute(references=["Hi.", "I'm sorry to hear that", "I don't know"], vocab_size=50257)
49
+ >>> print(results)
50
+
51
+
52
+ >>> dataset = ["This is my friend jack", "I'm sorry to hear that", "But you know I am the one who always support you", "Welcome to our family"]
53
+ >>> results = my_new_module.compute(references=["Hi.", "I'm sorry to hear that", "I don't know"], dataForVocabCal = dataset)
54
+ >>> print(results)
55
+
56
+ ```
57
+
58
+
59
+ Example of calculate original Distinct. This will return Distinct-1,2,and 3.
60
+ ```python
61
+ >>> my_new_module = evaluate.load("lsy641/distinct")
62
+ >>> results = my_new_module.compute(references=["Hi.", "I'm sorry to hear that", "I don't know"], mode="Distinct")
63
+ >>> print(results)
64
+ ```
65
 
66
  ## Limitations and Bias
67
+
68
 
69
  ## Citation
70
+ ```bibtex
71
+ @inproceedings{liu-etal-2022-rethinking,
72
+ title = "Rethinking and Refining the Distinct Metric",
73
+ author = "Liu, Siyang and
74
+ Sabour, Sahand and
75
+ Zheng, Yinhe and
76
+ Ke, Pei and
77
+ Zhu, Xiaoyan and
78
+ Huang, Minlie",
79
+ booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
80
+ year = "2022",
81
+ publisher = "Association for Computational Linguistics",
82
+ url = "https://aclanthology.org/2022.acl-short.86",
83
+ doi = "10.18653/v1/2022.acl-short.86",
84
+ }
85
+
86
+ @inproceedings{li-etal-2016-diversity,
87
+ title = "A Diversity-Promoting Objective Function for Neural Conversation Models",
88
+ author = "Li, Jiwei and
89
+ Galley, Michel and
90
+ Brockett, Chris and
91
+ Gao, Jianfeng and
92
+ Dolan, Bill",
93
+ booktitle = "Proceedings of the 2016 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies",
94
+ year = "2016",
95
+ publisher = "Association for Computational Linguistics",
96
+ url = "https://aclanthology.org/N16-1014",
97
+ doi = "10.18653/v1/N16-1014",
98
+ }
99
+ ```
100
 
101
  ## Further References
102
  *Add any useful further references.*