Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
python-version: [3.9, '3.10', 3.11, 3.12]
defaults:
run:
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions pinecone_text/sparse/bm25_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def __init__(
@staticmethod
def nltk_setup() -> None:
try:
nltk.data.find("tokenizers/punkt")
nltk.data.find("tokenizers/punkt_tab")
except LookupError:
nltk.download("punkt")
nltk.download("punkt_tab")

try:
nltk.data.find("corpora/stopwords")
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[tool.poetry]
name = "pinecone-text"
version = "0.9.0"
version = "0.10.0"
description = "Text utilities library by Pinecone.io"
authors = ["Pinecone.io"]
readme = "README.md"
packages = [{include = "pinecone_text"}]

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
python = ">=3.9,<4.0"
torch = { version = ">=1.13.1", optional = true }
transformers = { version = ">=4.26.1", optional = true }
sentence-transformers = { version = ">=2.0.0", optional = true }
wget = "^3.2"
mmh3 = "^4.1.0"
nltk = "^3.6.5"
nltk = "^3.9.1"
openai = { version = "^1.2.3", optional = true }
cohere = { version = "^4.37", optional = true }
numpy = [
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_bm25_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_nltk_download(self):
language="english",
)

nltk.find("tokenizers/punkt")
nltk.find("tokenizers/punkt_tab")
nltk.find("corpora/stopwords")

assert tokenizer("The quick brown fox jumps over the lazy dog") == [
Expand Down