| | --- |
| | language: |
| | - en |
| | datasets: |
| | - simpeval |
| | tags: |
| | - simplification |
| | license: apache-2.0 |
| | --- |
| | |
| | This contains the trained checkpoint for LENS, as introduced in [**LENS: A Learnable Evaluation Metric for Text Simplification**](https://aclanthology.org/2023.acl-long.905) (ACL, 2023). For more information, please refer to the [**LENS repository**](https://github.com/Yao-Dou/LENS). |
| |
|
| | ```bash |
| | pip install lens-metric |
| | ``` |
| |
|
| | ```python |
| | from lens import download_model, LENS |
| | |
| | lens_path = download_model("davidheineman/lens") |
| | lens = LENS(lens_path, rescale=True) |
| | |
| | complex = [ |
| | "They are culturally akin to the coastal peoples of Papua New Guinea." |
| | ] |
| | simple = [ |
| | "They are culturally similar to the people of Papua New Guinea." |
| | ] |
| | references = [[ |
| | "They are culturally similar to the coastal peoples of Papua New Guinea.", |
| | "They are similar to the Papua New Guinea people living on the coast." |
| | ]] |
| | |
| | scores = lens.score(complex, simple, references, batch_size=8, devices=[0]) |
| | print(scores) # [78.6344531130125] |
| | ``` |
| |
|
| | For an example, please see the [quick demo Google Collab notebook](https://colab.research.google.com/drive/1rIYrbl5xzL5b5sGUQ6zFBfwlkyIDg12O?usp=sharing). |
| |
|
| | ## Intended uses |
| | 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). |
| |
|
| | ## Cite LENS |
| | If you find our paper, code or data helpful, please consider citing [**our work**](https://aclanthology.org/2023.acl-long.905): |
| | ```tex |
| | @inproceedings{maddela-etal-2023-lens, |
| | title = "{LENS}: A Learnable Evaluation Metric for Text Simplification", |
| | author = "Maddela, Mounica and |
| | Dou, Yao and |
| | Heineman, David and |
| | Xu, Wei", |
| | booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)", |
| | month = jul, |
| | year = "2023", |
| | address = "Toronto, Canada", |
| | publisher = "Association for Computational Linguistics", |
| | url = "https://aclanthology.org/2023.acl-long.905", |
| | doi = "10.18653/v1/2023.acl-long.905", |
| | pages = "16383--16408", |
| | } |
| | ``` |