nltk

Форк
0
/
setup.py 
125 строк · 3.7 Кб
1
#!/usr/bin/env python
2
#
3
# Setup script for the Natural Language Toolkit
4
#
5
# Copyright (C) 2001-2023 NLTK Project
6
# Author: NLTK Team <nltk.team@gmail.com>
7
# URL: <https://www.nltk.org/>
8
# For license information, see LICENSE.TXT
9

10
# Work around mbcs bug in distutils.
11
# https://bugs.python.org/issue10945
12
import codecs
13

14
try:
15
    codecs.lookup("mbcs")
16
except LookupError:
17
    ascii = codecs.lookup("ascii")
18
    func = lambda name, enc=ascii: {True: enc}.get(name == "mbcs")
19
    codecs.register(func)
20

21
import os
22

23
# Use the VERSION file to get NLTK version
24
version_file = os.path.join(os.path.dirname(__file__), "nltk", "VERSION")
25
with open(version_file) as fh:
26
    nltk_version = fh.read().strip()
27

28
# setuptools
29
from setuptools import find_packages, setup
30

31
# Specify groups of optional dependencies
32
extras_require = {
33
    "machine_learning": [
34
        "numpy",
35
        "python-crfsuite",
36
        "scikit-learn",
37
        "scipy",
38
    ],
39
    "plot": ["matplotlib"],
40
    "tgrep": ["pyparsing"],
41
    "twitter": ["twython"],
42
    "corenlp": ["requests"],
43
}
44

45
# Add a group made up of all optional dependencies
46
extras_require["all"] = {
47
    package for group in extras_require.values() for package in group
48
}
49

50
# Adds CLI commands
51
console_scripts = """
52
[console_scripts]
53
nltk=nltk.cli:cli
54
"""
55

56
_project_homepage = "https://www.nltk.org/"
57

58
setup(
59
    name="nltk",
60
    description="Natural Language Toolkit",
61
    version=nltk_version,
62
    url=_project_homepage,
63
    project_urls={
64
        "Documentation": _project_homepage,
65
        "Source Code": "https://github.com/nltk/nltk",
66
        "Issue Tracker": "https://github.com/nltk/nltk/issues",
67
    },
68
    long_description="""\
69
The Natural Language Toolkit (NLTK) is a Python package for
70
natural language processing.  NLTK requires Python 3.8, 3.9, 3.10, 3.11 or 3.12.""",
71
    license="Apache License, Version 2.0",
72
    keywords=[
73
        "NLP",
74
        "CL",
75
        "natural language processing",
76
        "computational linguistics",
77
        "parsing",
78
        "tagging",
79
        "tokenizing",
80
        "syntax",
81
        "linguistics",
82
        "language",
83
        "natural language",
84
        "text analytics",
85
    ],
86
    maintainer="NLTK Team",
87
    maintainer_email="nltk.team@gmail.com",
88
    author="NLTK Team",
89
    author_email="nltk.team@gmail.com",
90
    classifiers=[
91
        "Development Status :: 5 - Production/Stable",
92
        "Intended Audience :: Developers",
93
        "Intended Audience :: Education",
94
        "Intended Audience :: Information Technology",
95
        "Intended Audience :: Science/Research",
96
        "License :: OSI Approved :: Apache Software License",
97
        "Operating System :: OS Independent",
98
        "Programming Language :: Python :: 3.8",
99
        "Programming Language :: Python :: 3.9",
100
        "Programming Language :: Python :: 3.10",
101
        "Programming Language :: Python :: 3.11",
102
        "Programming Language :: Python :: 3.12",
103
        "Topic :: Scientific/Engineering",
104
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
105
        "Topic :: Scientific/Engineering :: Human Machine Interfaces",
106
        "Topic :: Scientific/Engineering :: Information Analysis",
107
        "Topic :: Text Processing",
108
        "Topic :: Text Processing :: Filters",
109
        "Topic :: Text Processing :: General",
110
        "Topic :: Text Processing :: Indexing",
111
        "Topic :: Text Processing :: Linguistic",
112
    ],
113
    package_data={"nltk": ["test/*.doctest", "VERSION"]},
114
    python_requires=">=3.8",
115
    install_requires=[
116
        "click",
117
        "joblib",
118
        "regex>=2021.8.3",
119
        "tqdm",
120
    ],
121
    extras_require=extras_require,
122
    packages=find_packages(),
123
    zip_safe=False,  # since normal files will be present too?
124
    entry_points=console_scripts,
125
)
126

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.