# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


class PyNltk(PythonPackage):
    """The Natural Language Toolkit (NLTK) is a Python package for
    natural language processing."""

    homepage = "https://www.nltk.org/"
    url      = "https://pypi.io/packages/source/n/nltk/nltk-3.5.zip"

    version('3.5', sha256='845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35')

    variant('data', default=False, description='Download the NLTK data')

    depends_on('python@3.5:', type=('build', 'run'))
    depends_on('py-setuptools', type=('build', 'run'))
    depends_on('py-joblib', type=('build', 'run'))
    depends_on('py-click', type=('build', 'run'))
    depends_on('py-regex', type=('build', 'run'))
    depends_on('py-tqdm', type=('build', 'run'))

    resource(name='perluniprops',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/misc/perluniprops.zip',
             when='+data',
             sha256='57d54f591c4ed299b3cdf348eecf774ab2858f19e66955352d94ae555e2050ef',
             destination='nltk_data/misc',
             placement='perluniprops')
    resource(name='mwa_ppdb',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/misc/mwa_ppdb.zip',
             when='+data',
             sha256='65f70300d720a280eb19899b222c94a630be5e378f01a658cc0a4bb50fa50b41',
             destination='nltk_data/misc',
             placement='mwa_ppdb')
    resource(name='punkt',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/tokenizers/punkt.zip',
             when='+data',
             sha256='9a74e3cc0057021b12984c07cc5e46cb746385cf90f49b7d6fe806fb71610144',
             destination='nltk_data/tokenizers',
             placement='punkt')
    resource(name='rslp',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/stemmers/rslp.zip',
             when='+data',
             sha256='f482f9666a2a76cdd4acab16b01a44b002550ebaac29906dbd5a1bbc281e4f8b',
             destination='nltk_data/stemmers',
             placement='rslp')
    resource(name='porter_test',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/stemmers/porter_test.zip',
             when='+data',
             sha256='7760e1ae3a7a975d0b67f8afd9a0a53a29f94da73508b525d1b6e08205924669',
             destination='nltk_data/stemmers',
             placement='porter_test')
    resource(name='snowball_data',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/stemmers/snowball_data.zip',
             when='+data',
             sha256='e8a05c19890f8651df2b958b0f6e318d4476b8a500e26ed63f89077aed0585a2',
             destination='nltk_data/stemmers',
             placement='snowball_data')
    resource(name='maxent_ne_chunker',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/chunkers/maxent_ne_chunker.zip',
             when='+data',
             sha256='b7cdb936c551c06ef2cdc6227238c5ccc9c8c5259a11f99f4a937419d52af61b',
             destination='nltk_data/chunkers',
             placement='maxent_ne_chunker')
    resource(name='moses_sample',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/models/moses_sample.zip',
             when='+data',
             sha256='0639dfa1d1939295d29c3d57478b1eb7767405dc916effe2cf6a90071943f7e8',
             destination='nltk_data/models',
             placement='moses_sample')
    resource(name='bllip_wsj_no_aux',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/models/bllip_wsj_no_aux.zip',
             when='+data',
             sha256='e00339b708f23c24b5cf67ff3db5711dd4d80b21083f52787cf167bf77ac2126',
             destination='nltk_data/models',
             placement='bllip_wsj_no_aux')
    resource(name='word2vec_sample',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/models/word2vec_sample.zip',
             when='+data',
             sha256='d29ff84a6ceca407f8578648568c55894dac34641ceb1fa02f920264fe326b43',
             destination='nltk_data/models',
             placement='word2vec_sample')
    resource(name='wmt15_eval',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/models/wmt15_eval.zip',
             when='+data',
             sha256='56ea67e320f75be1abdee60b9d57aef1bd50324edd176e11c3c40f451043c80e',
             destination='nltk_data/models',
             placement='wmt15_eval')
    resource(name='spanish_grammars',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/grammars/spanish_grammars.zip',
             when='+data',
             sha256='4207035d8795d37000c06391d97b068ae470a43db697d96473018f392552b742',
             destination='nltk_data/grammars',
             placement='spanish_grammars')
    resource(name='sample_grammars',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/grammars/sample_grammars.zip',
             when='+data',
             sha256='8c3e4fecdc47ef1d262401eda08bde995cf4ed912a7934a32905263485240872',
             destination='nltk_data/grammars',
             placement='sample_grammars')
    resource(name='large_grammars',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/grammars/large_grammars.zip',
             when='+data',
             sha256='5a81e5278757fafe6e8f19b16f6e4363783635ee332c5c238a30e190f735da59',
             destination='nltk_data/grammars',
             placement='large_grammars')
    resource(name='book_grammars',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/grammars/book_grammars.zip',
             when='+data',
             sha256='cc63b32d680888c04b3c332218d645a9f9db8571ffe7229808391c889796ffbd',
             destination='nltk_data/grammars',
             placement='book_grammars')
    resource(name='basque_grammars',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/grammars/basque_grammars.zip',
             when='+data',
             sha256='40ec8a0e92079f32a6900189e8551909506e727b19652f28641fcd825a374ec7',
             destination='nltk_data/grammars',
             placement='basque_grammars')
    resource(name='maxent_treebank_pos_tagger',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/taggers/maxent_treebank_pos_tagger.zip',
             when='+data',
             sha256='6ba605d803ad5e9aeb604dc9c82573afd44e9c9ad1f228788eb05ddd88ef0b24',
             destination='nltk_data/taggers',
             placement='maxent_treebank_pos_tagger')
    resource(name='averaged_perceptron_tagger',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/taggers/averaged_perceptron_tagger.zip',
             when='+data',
             sha256='e1f13cf2532daadfd6f3bc481a49859f0b8ea6432ccdcd83e6a49a5f19008de9',
             destination='nltk_data/taggers',
             placement='averaged_perceptron_tagger')
    resource(name='averaged_perceptron_tagger_ru',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/taggers/averaged_perceptron_tagger_ru.zip',
             when='+data',
             sha2
56='82a4ec6fd815dcee0fe6e150aed8fefa0ae501eba6e62b94fafbfc089af8954b',
             destination='nltk_data/taggers',
             placement='averaged_perceptron_tagger_ru')
    resource(name='universal_tagset',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/taggers/u
niversal_tagset.zip',
             when='+data',
             sha256='fb3b295a7b636d3f50e2bd3f9bd4c84eb99eaf36ff475ea406bdecd247f8f962',
             destination='nltk_data/taggers',
             placement='universal_tagset')
    resource(name='vader_lexicon',
             url='https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/sentiment/vader_lexicon.zip',
             when='+data',
 