Views
No views yet
1from sentence_transformers import SentenceTransformer
2from sentence_transformers.util import cos_sim
3
4model = SentenceTransformer('StyleDistance/styledistance') # Load model
5
6input = model.encode("Did you hear about the Wales wing? He'll h8 2 withdraw due 2 injuries from future competitions.")
7others = model.encode(["We're raising funds 2 improve our school's storage facilities and add new playground equipment!", "Did you hear about the Wales wing? He'll hate to withdraw due to injuries from future competitions."])
8print(cos_sim(input, others))1@misc{patel2025styledistancestrongercontentindependentstyle,
2 title={StyleDistance: Stronger Content-Independent Style Embeddings with Synthetic Parallel Examples},
3 author={Ajay Patel and Jiacheng Zhu and Justin Qiu and Zachary Horvitz and Marianna Apidianaki and Kathleen McKeown and Chris Callison-Burch},
4 year={2025},
5 eprint={2410.12757},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2410.12757},
9}