Skip to content

Commit

Permalink
Merge pull request #300 from aslafy-z/patch-1
Browse files Browse the repository at this point in the history
fix: upgrading nltk dependency to fix wordnet/punkt download
  • Loading branch information
srbhr authored Jan 8, 2025
2 parents baa9e02 + 7e60d1a commit 367b9dd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mdurl==0.1.2
more-itertools==9.1.0
murmurhash==1.0.9
networkx==3.1
nltk==3.9
nltk==3.9.1
numpy==1.25.1
packaging==23.1
pandas==2.0.3
Expand Down Expand Up @@ -113,4 +113,4 @@ reportlab==3.6.13
easygui==0.98.3
xhtml2pdf==0.2.11
fastembed~=0.2.2
qdrant-client==1.9.0
qdrant-client==1.9.0
4 changes: 2 additions & 2 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
config_path = os.path.join(cwd, "scripts", "similarity")

try:
nltk.data.find("tokenizers/punkt")
nltk.data.find("tokenizers/punkt_tab")
except LookupError:
nltk.download("punkt")
nltk.download("punkt_tab")

parameters.SHOW_LABEL_SEPARATOR = False
parameters.BORDER_RADIUS = 3
Expand Down
6 changes: 3 additions & 3 deletions streamlit_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
cwd = find_path("Resume-Matcher")
config_path = os.path.join(cwd, "scripts", "similarity")

# Check if NLTK punkt data is available, if not, download it
# Check if NLTK punkt_tab data is available, if not, download it
try:
nltk.data.find("tokenizers/punkt")
nltk.data.find("tokenizers/punkt_tab")
except LookupError:
nltk.download("punkt")
nltk.download("punkt_tab")

# Set some visualization parameters using the annotated_text library
parameters.SHOW_LABEL_SEPARATOR = False
Expand Down
6 changes: 5 additions & 1 deletion streamlit_second.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
initial_sidebar_state="auto",
)

nltk.download("punkt")
# Check if NLTK punkt_tab data is available, if not, download it
try:
nltk.data.find("tokenizers/punkt_tab")
except LookupError:
nltk.download("punkt_tab")

parameters.SHOW_LABEL_SEPARATOR = False
parameters.BORDER_RADIUS = 3
Expand Down

0 comments on commit 367b9dd

Please sign in to comment.