bhavnicksm / chonkie

🦛 CHONK your texts with Chonkie ✨ - The no-nonsense RAG chunking library
https://pypi.org/project/chonkie/
MIT License
1.69k stars 61 forks source link

[Refactor] Optimize similarity calculation by using np.divide for imp… #54

Closed bhavnicksm closed 5 days ago

bhavnicksm commented 5 days ago

This pull request includes improvements to the computation of cosine similarity in the similarity method across two files to enhance numerical stability and precision.

Changes to cosine similarity computation: