From bd167b5a91584d4449911b5cfffa4ba7e23cbc3c Mon Sep 17 00:00:00 2001 From: Wolfgang Fahl Date: Fri, 29 Mar 2024 18:56:41 +0100 Subject: [PATCH] fixes #73 --- geograpy/geograpy_nltk.py | 14 ++++++++++++++ pyproject.toml | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 geograpy/geograpy_nltk.py diff --git a/geograpy/geograpy_nltk.py b/geograpy/geograpy_nltk.py new file mode 100755 index 0000000..8080009 --- /dev/null +++ b/geograpy/geograpy_nltk.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +# converted to python script 2024-03-29 +import nltk +def main(): + nltk.downloader.download('maxent_ne_chunker') + nltk.downloader.download('words') + nltk.downloader.download('treebank') + nltk.downloader.download('maxent_treebank_pos_tagger') + nltk.downloader.download('punkt') + # since 2020-09 + nltk.downloader.download('averaged_perceptron_tagger') + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 82da994..6022a89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,8 @@ test = [ ] [project.scripts] -geograpy = "geograpy.locator:main" +geograpy = "geograpy.locate:main" +geograpy-nltk = "geograpy.geograpy_nltk:main" [project.data-files."geograpy/data"] include = ["*.csv"]