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
4 changes: 2 additions & 2 deletions ltk_data/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
def add_nltk_path(path: str):
utilo.exists_assert(path)
seperator = os.pathsep
before = os.environ.get('ltk_data', '')
before = os.environ.get('NLTK_DATA', '')
if before:
before += seperator
current = f'{before}{path}'
os.environ['ltk_data'] = current
os.environ['NLTK_DATA'] = current
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ authors = [
]
dependencies = [
"utilo>=2.109.1,<3.0.0",
"nltk>=3.10.0,<4.0.0",
"nltk>=3.10.2,<4.0.0",
]
keywords = []
classifiers = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def test_nltk_config():
assert os.path.exists(os.environ['ltk_data'])
assert os.path.exists(os.environ['NLTK_DATA'])
assert os.path.exists(ltk_data.STOPWORDS)


Expand Down