Views
No views yet
pip install lens-metric1from lens import download_model, LENS
2
3lens_path = download_model("davidheineman/lens")
4lens = LENS(lens_path, rescale=True)
5
6complex = [
7 "They are culturally akin to the coastal peoples of Papua New Guinea."
8]
9simple = [
10 "They are culturally similar to the people of Papua New Guinea."
11]
12references = [[
13 "They are culturally similar to the coastal peoples of Papua New Guinea.",
14 "They are similar to the Papua New Guinea people living on the coast."
15]]
16
17scores = lens.score(complex, simple, references, batch_size=8, devices=[0])
18print(scores) # [78.6344531130125]1@inproceedings{maddela-etal-2023-lens,
2 title = "{LENS}: A Learnable Evaluation Metric for Text Simplification",
3 author = "Maddela, Mounica and
4 Dou, Yao and
5 Heineman, David and
6 Xu, Wei",
7 booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
8 month = jul,
9 year = "2023",
10 address = "Toronto, Canada",
11 publisher = "Association for Computational Linguistics",
12 url = "https://aclanthology.org/2023.acl-long.905",
13 doi = "10.18653/v1/2023.acl-long.905",
14 pages = "16383--16408",
15}