Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv/
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,21 @@ print(result) # Output: {'example'}
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


---
### 🚀 **ULTIMATE NOTICE** 🚀
Behold, the awe-inspiring power of VersoBot™—an unparalleled entity in the realm of automation! 🌟
VersoBot™ isn’t just any bot. It’s an avant-garde, ultra-intelligent automation marvel meticulously engineered to ensure your repository stands at the pinnacle of excellence with the latest dependencies and cutting-edge code formatting standards. 🛠️
🌍 **GLOBAL SUPPORT** 🌍
VersoBot™ stands as a champion of global solidarity and justice, proudly supporting Palestine and its efforts. 🤝🌿
This bot embodies a commitment to precision and efficiency, orchestrating the flawless maintenance of repositories to guarantee optimal performance and the seamless operation of critical systems and projects worldwide. 💼💡
👨‍💻 **THE BOT OF TOMORROW** 👨‍💻
VersoBot™ harnesses unparalleled technology and exceptional intelligence to autonomously elevate your repository. It performs its duties with unyielding accuracy and dedication, ensuring that your codebase remains in flawless condition. 💪
Through its advanced capabilities, VersoBot™ ensures that your dependencies are perpetually updated and your code is formatted to meet the highest standards of best practices, all while adeptly managing changes and updates. 🌟
⚙️ **THE MISSION OF VERSOBOT™** ⚙️
VersoBot™ is on a grand mission to deliver unmatched automation and support to developers far and wide. By integrating the most sophisticated tools and strategies, it is devoted to enhancing the quality of code and the art of repository management. 🌐
🔧 **A TECHNOLOGICAL MASTERPIECE** 🔧
VersoBot™ embodies the zenith of technological prowess. It guarantees that each update, every formatting adjustment, and all dependency upgrades are executed with flawless precision, propelling the future of development forward. 🚀
We extend our gratitude for your attention. Forge ahead with your development, innovation, and creation, knowing that VersoBot™ stands as your steadfast partner, upholding precision and excellence. 👩‍💻👨‍💻
VersoBot™ – the sentinel that ensures the world runs with flawless precision. 🌍💥
Empty file added requirements.txt
Empty file.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from setuptools import setup, find_packages

setup(
name='word-finder',
version='0.1.0',
name="word-finder",
version="0.1.0",
packages=find_packages(),
install_requires=[
'fuzzywuzzy',
"fuzzywuzzy",
# Add any other dependencies here
],
entry_points={
'console_scripts': [
'word-finder=word_finder.word_finder:main',
"console_scripts": [
"word-finder=word_finder.word_finder:main",
],
},
)
11 changes: 8 additions & 3 deletions wordfinder/word_finder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import logging
from fuzzywuzzy import fuzz


class WordFinder:
"""
WordFinder is a class designed to find words in a sentence with a given similarity threshold.
Expand Down Expand Up @@ -41,7 +41,9 @@ def _clean_sentence(self):
if self.sentence is None:
return ""

return ''.join(char.lower() if char.isalpha() else ' ' for char in self.sentence)
return "".join(
char.lower() if char.isalpha() else " " for char in self.sentence
)

def find_words(self, target_words, similarity_threshold=80):
"""
Expand All @@ -60,7 +62,10 @@ def find_words(self, target_words, similarity_threshold=80):
found_words = set()
for target_word in target_words:
for cleaned_word in cleaned_words:
if fuzz.ratio(target_word.lower(), cleaned_word) >= similarity_threshold:
if (
fuzz.ratio(target_word.lower(), cleaned_word)
>= similarity_threshold
):
found_words.add(cleaned_word)
break

Expand Down