SHA256
1
0
forked from pool/python-nltk

Compare commits

...

57 Commits

Author SHA256 Message Date
Ana Guerrero
adf16be356 Accepting request 1218976 from devel:languages:python
- Use _service to download source and exclude documentation that has
  non-commercial license (boo#1232448)
- Remove nltk_data to avoid redistribution of files with
  non-commercial (boo#1232448):
  > NLTK corpora are provided under the terms given in the README file
  > for each corpus; all are redistributable and available for
  > non-commercial use.
- Remove not needed skip-networked-test.patch

OBS-URL: https://build.opensuse.org/request/show/1218976
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=19
2024-10-29 13:36:45 +00:00
35a1d0ac0d - Use _service to download source and exclude documentation that has
non-commercial license (boo#1232448)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=57
2024-10-29 09:33:33 +00:00
5a720a2613 - Remove nltk_data to avoid redistribution of files with
non-commercial (boo#1232448):
  > NLTK corpora are provided under the terms given in the README file
  > for each corpus; all are redistributable and available for
  > non-commercial use.
- Remove not needed skip-networked-test.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=56
2024-10-29 09:09:02 +00:00
Ana Guerrero
f02d8a709b Accepting request 1218494 from devel:languages:python
- Update to to 3.9.1 (changes since 3.8.1):
  * Fixed bug that prevented wordnet from loading
  * Fix security vulnerability CVE-2024-39705 (breaking change)
  * Replace pickled models (punkt, chunker, taggers) by new
    pickle-free "_tab" packages
  * No longer sort Wordnet synsets and relations (sort in calling
    function when required)
  * Only strip the last suffix in Wordnet Morphy, thus
    restricting synsets() results
  * Add Python 3.12 support
  * Many other minor fixes
- Refresh nltk_data
- Remome upstreamed patches:
  - CVE-2024-39705.patch
  - nltk-pr3207-py312.patch

- Update to 3.8

OBS-URL: https://build.opensuse.org/request/show/1218494
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=18
2024-10-27 10:25:56 +00:00
3bfd0bcb33 Fix the changelog
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=54
2024-10-26 08:13:11 +00:00
ed382a6087 - Update to to 3.9.1:
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=53
2024-10-26 08:11:04 +00:00
5be3f27b87 Fix the changelog
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=52
2024-10-26 08:09:16 +00:00
709f4f9348 update to version 3.9.1
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=51
2024-10-26 07:58:26 +00:00
Dominique Leuenberger
39ddb1bbb2 Accepting request 1189727 from devel:languages:python
- Add CVE-2024-39705.patch upstream patch to fix unsafe pickle usage.
  (CVE-2024-39705, gh#nltk/nltk#3266, bsc#1227174).
- Drop CVE-2024-39705-disable-download.patch as it's not needed
  anymore.

OBS-URL: https://build.opensuse.org/request/show/1189727
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=17
2024-07-26 14:16:05 +00:00
Ana Guerrero
a331f038f7 Accepting request 1185062 from devel:languages:python
- Use tarball from GitHub instead of the Zip archive from PyPI,
  the latter has very messy combination of CRLF and LF EOLs,
  which are hard to patch.
- Refresh all patches from the original locations.
- Add CVE-2024-39705-disable-download.patch to make a crude
  workaround around CVE-2024-39705 (gh#nltk/nltk#3266,
  bsc#1227174).

OBS-URL: https://build.opensuse.org/request/show/1185062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=16
2024-07-04 14:24:00 +00:00
3ac2448eef - Use tarball from GitHub instead of the Zip archive from PyPI,
the latter has very messy combination of CRLF and LF EOLs,
  which are hard to patch.
- Refresh all patches from the original locations.
- Add CVE-2024-39705-disable-download.patch to make a crude
  workaround around CVE-2024-39705 (gh#nltk/nltk#3266,
  bsc#1227174).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=47
2024-07-02 21:12:29 +00:00
Ana Guerrero
59b1ddaa8c Accepting request 1160546 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1160546
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=15
2024-03-22 14:21:17 +00:00
f64d1a206e Accepting request 1160467 from home:bnavigator:branches:devel:languages:python
- Update to 3.8.1
  * Resolve RCE & XSS vulnerabilities in localhost WordNet Browser
  * Add Python 3.11 support
- Update nltk_data archive
- Drop port-2to3.patch
- Add nltk-pr3207-py312.patch for Python 3.12 support
  * gh#nltk/nltk#3207

OBS-URL: https://build.opensuse.org/request/show/1160467
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=45
2024-03-22 06:59:49 +00:00
Dominique Leuenberger
2ab5c3661f Accepting request 1077159 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1077159
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=14
2023-04-04 19:26:27 +00:00
3547d0cab5 Accepting request 1074922 from home:pgajdos:python
- python-six is not required

OBS-URL: https://build.opensuse.org/request/show/1074922
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=43
2023-03-28 08:50:18 +00:00
Dominique Leuenberger
55736f1bb6 Accepting request 1056667 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1056667
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=13
2023-01-07 16:19:21 +00:00
047369afb9 Accepting request 1056422 from home:yarunachalam:branches:devel:languages:python
- Update to 3.8 
* Refactor dispersion plot (#3082)
* Provide type hints for LazyCorpusLoader variables (#3081)
* Throw warning when LanguageModel is initialized with incorrect vocabulary (#3080)
* Fix WordNet's all_synsets() function (#3078)
* Resolve TreebankWordDetokenizer inconsistency with end-of-string contractions (#3070)
* Support both iso639-3 codes and BCP-47 language tags (#3060)
* Avoid DeprecationWarning in Regexp tokenizer (#3055)
* Fix many doctests, add doctests to CI (#3054, #3050, #3048)
* Fix bool field not being read in VerbNet (#3044)
* Greatly improve time efficiency of SyllableTokenizer when tokenizing numbers (#3042)
* Fix encodings of Polish udhr corpus reader (#3038)
* Allow TweetTokenizer to tokenize emoji flag sequences (#3034)
* Prevent LazyModule from increasing the size of nltk.__dict__ (#3033)
* Fix CoreNLPServer non-default port issue (#3031)
* Add "acion" suffix to the Spanish SnowballStemmer (#3030)
* Allow loading WordNet without OMW (#3026)
* Use input() in nltk.chat.chatbot() for Jupyter support (#3022)
* Fix edit_distance_align() in distance.py (#3017)
* Tackle performance and accuracy regression of sentence tokenizer since NLTK 3.6.6 (#3014)
* Add the Iota operator to semantic logic (#3010)
* Resolve critical errors in WordNet app (#3008)
* Resolve critical error in CHILDES Corpus (#2998)
* Make WordNet information_content() accept adjective satellites (#2995)
* Add "strict=True" parameter to CoreNLP (#2993, #3043)
* Resolve issue with WordNet's synset_from_sense_key (#2988)
* Handle WordNet synsets that were lost in mapping (#2985)
* Resolve TypeError in Boxer (#2979)
* Add function to retrieve WordNet synonyms (#2978)
* Warn about nonexistent OMW offsets instead of raising an error (#2974)

OBS-URL: https://build.opensuse.org/request/show/1056422
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=41
2023-01-06 18:19:24 +00:00
Dominique Leuenberger
f9e9dcd3e8 Accepting request 1045543 from devel:languages:python
- Complete nltk_data.tar.xz for offline testing
- Fix failing tests (gh#nltk/nltk#2969) by adding patches:
  - port-2to3.patch
  - skip-networked-test.patch
- Clean up the SPEC to get rid of rpmlint warnings.

OBS-URL: https://build.opensuse.org/request/show/1045543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=12
2022-12-28 09:54:39 +00:00
c684ece13a - Clean up the SPEC to get rid of rpmlint warnings.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=39
2022-12-27 17:26:56 +00:00
75f3e6db1b - Complete nltk_data.tar.xz for offline testing
- Fix failing tests (gh#nltk/nltk#2969) by adding patches:
  - port-2to3.patch
  - skip-networked-test.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=38
2022-12-27 10:15:18 +00:00
Dominique Leuenberger
b6a580c35d Accepting request 965220 from devel:languages:python
- Update to 3.7
  - Improve and update the NLTK team page on nltk.org (#2855,
    #2941)
  - Drop support for Python 3.6, support Python 3.10 (#2920)
- Update to 3.6.7
  - Resolve IndexError in `sent_tokenize` and `word_tokenize`
    (#2922)
- Update to 3.6.6
  - Refactor `gensim.doctest` to work for gensim 4.0.0 and up
    (#2914)
  - Add Precision, Recall, F-measure, Confusion Matrix to Taggers
    (#2862)
  - Added warnings if .zip files exist without any corresponding
    .csv files. (#2908)
  - Fix `FileNotFoundError` when the `download_dir` is
    a non-existing nested folder (#2910)
  - Rename omw to omw-1.4 (#2907)
  - Resolve ReDoS opportunity by fixing incorrectly specified
    regex (#2906, bsc#1191030, CVE-2021-3828).
  - Support OMW 1.4 (#2899)
  - Deprecate Tree get and set node methods (#2900)
  - Fix broken inaugural test case (#2903)
  - Use Multilingual Wordnet Data from OMW with newer Wordnet
    versions (#2889)
  - Keep NLTKs "tokenize" module working with pathlib (#2896)
  - Make prettyprinter to be more readable (#2893)
  - Update links to the nltk book (#2895)
  - Add `CITATION.cff` to nltk (#2880)
  - Resolve serious ReDoS in PunktSentenceTokenizer (#2869)
  - Delete old CI config files (#2881)

OBS-URL: https://build.opensuse.org/request/show/965220
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=11
2022-03-28 15:00:52 +00:00
31f5bb280c - Update to 3.7
- Improve and update the NLTK team page on nltk.org (#2855,
    #2941)
  - Drop support for Python 3.6, support Python 3.10 (#2920)
- Update to 3.6.7
  - Resolve IndexError in `sent_tokenize` and `word_tokenize`
    (#2922)
- Update to 3.6.6
  - Refactor `gensim.doctest` to work for gensim 4.0.0 and up
    (#2914)
  - Add Precision, Recall, F-measure, Confusion Matrix to Taggers
    (#2862)
  - Added warnings if .zip files exist without any corresponding
    .csv files. (#2908)
  - Fix `FileNotFoundError` when the `download_dir` is
    a non-existing nested folder (#2910)
  - Rename omw to omw-1.4 (#2907)
  - Resolve ReDoS opportunity by fixing incorrectly specified
    regex (#2906, bsc#1191030, CVE-2021-3828).
  - Support OMW 1.4 (#2899)
  - Deprecate Tree get and set node methods (#2900)
  - Fix broken inaugural test case (#2903)
  - Use Multilingual Wordnet Data from OMW with newer Wordnet
    versions (#2889)
  - Keep NLTKs "tokenize" module working with pathlib (#2896)
  - Make prettyprinter to be more readable (#2893)
  - Update links to the nltk book (#2895)
  - Add `CITATION.cff` to nltk (#2880)
  - Resolve serious ReDoS in PunktSentenceTokenizer (#2869)
  - Delete old CI config files (#2881)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=36
2022-03-22 07:58:51 +00:00
Dominique Leuenberger
2a2e599aca Accepting request 812413 from devel:languages:python
- Update to v3.5
  * add support for Python 3.8
  * drop support for Python 2
  * create NLTK's own Tokenizer class distinct from the Treebank
    reference tokeniser
  * update Vader sentiment analyser
  * fix JSON serialization of some PoS taggers
  * minor improvements in grammar.CFG, Vader, pl196x corpus reader,
    StringTokenizer
  * change implementation <= and >= for FreqDist so they are partial
    orders
  * make FreqDist iterable
  * correctly handle Penn Treebank trees with a unlabeled branching
    top node

OBS-URL: https://build.opensuse.org/request/show/812413
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=10
2020-06-08 22:02:35 +00:00
Tomáš Chvátal
dc693937c4 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=34 2020-06-08 06:38:52 +00:00
Tomáš Chvátal
a1372c9d5b Accepting request 812178 from home:jayvdb:coala:python3-bears
- Update to v3.5
  * add support for Python 3.8
  * drop support for Python 2
  * create NLTK's own Tokenizer class distinct from the Treebank
    reference tokeniser
  * update Vader sentiment analyser
  * fix JSON serialization of some PoS taggers
  * minor improvements in grammar.CFG, Vader, pl196x corpus reader,
    StringTokenizer
  * change implementation <= and >= for FreqDist so they are partial
    orders
  * make FreqDist iterable
  * correctly handle Penn Treebank trees with a unlabeled branching
    top node

OBS-URL: https://build.opensuse.org/request/show/812178
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=33
2020-06-08 06:38:34 +00:00
Dominique Leuenberger
d80be684b4 Accepting request 787913 from devel:languages:python
- Update to 3.4.5 (bsc#1146427, CVE-2019-14751):

OBS-URL: https://build.opensuse.org/request/show/787913
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=9
2020-03-27 20:56:25 +00:00
aacb620672 - Update to 3.4.5 (bsc#1146427, CVE-2019-14751):
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=31
2020-03-24 19:10:59 +00:00
Dominique Leuenberger
9bc11634ca Accepting request 784877 from devel:languages:python
- Fix build without python2

OBS-URL: https://build.opensuse.org/request/show/784877
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=8
2020-03-16 09:18:08 +00:00
Tomáš Chvátal
633fd47a1c OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=29 2020-03-14 09:08:41 +00:00
Tomáš Chvátal
2dba26b898 - Fix build without python2
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=28
2020-03-14 09:07:33 +00:00
Dominique Leuenberger
51dfbc3159 Accepting request 738364 from devel:languages:python
Replace %fdupes -s with plain %fdupes; hardlinks are better.

OBS-URL: https://build.opensuse.org/request/show/738364
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=7
2019-10-16 07:15:03 +00:00
183dff8b81 - Replace %fdupes -s with plain %fdupes; hardlinks are better.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=26
2019-10-14 14:00:56 +00:00
Ludwig Nussel
98f9d97e5d Accepting request 730102 from devel:languages:python
- Update to 3.4.5:
  * Fixed security bug in downloader: Zip slip vulnerability - for the
    unlikely situation where a user configures their downloader to use
    a compromised server CVE-2019-14751

OBS-URL: https://build.opensuse.org/request/show/730102
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=6
2019-09-13 12:58:17 +00:00
Tomáš Chvátal
e103fbc93f - Update to 3.4.5:
* Fixed security bug in downloader: Zip slip vulnerability - for the
    unlikely situation where a user configures their downloader to use
    a compromised server CVE-2019-14751

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=24
2019-09-11 11:07:28 +00:00
Dominique Leuenberger
f338ff5c7a Accepting request 717915 from devel:languages:python
- Update to 3.4.4:
  * fix bug in plot function (probability.py)
  * add improved PanLex Swadesh corpus reader
  * add Text.generate()
  * add QuadgramAssocMeasures
  * add SSP to tokenizers
  * return confidence of best tag from AveragedPerceptron
  * make plot methods return Axes objects
  * don't require list arguments to PositiveNaiveBayesClassifier.train
  * fix Tree classes to work with native Python copy library
  * fix inconsistency for NomBank
  * fix random seeding in LanguageModel.generate
  * fix ConditionalFreqDist mutation on tabulate/plot call
  * fix broken links in documentation
  * fix misc Wordnet issues
  * update installation instructions

OBS-URL: https://build.opensuse.org/request/show/717915
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=5
2019-07-23 20:41:54 +00:00
Tomáš Chvátal
537166da9d - Update to 3.4.4:
* fix bug in plot function (probability.py)
  * add improved PanLex Swadesh corpus reader
  * add Text.generate()
  * add QuadgramAssocMeasures
  * add SSP to tokenizers
  * return confidence of best tag from AveragedPerceptron
  * make plot methods return Axes objects
  * don't require list arguments to PositiveNaiveBayesClassifier.train
  * fix Tree classes to work with native Python copy library
  * fix inconsistency for NomBank
  * fix random seeding in LanguageModel.generate
  * fix ConditionalFreqDist mutation on tabulate/plot call
  * fix broken links in documentation
  * fix misc Wordnet issues
  * update installation instructions

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=22
2019-07-23 13:53:26 +00:00
Dominique Leuenberger
247f5c91a0 Accepting request 705020 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/705020
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=4
2019-05-24 09:33:03 +00:00
Tomáš Chvátal
43690bb4dc Accepting request 705011 from home:pgajdos
- version update to 3.4.1
  * add chomsky_normal_form for CFGs
  * add meteor score
  * add minimum edit/Levenshtein distance based alignment function
  * allow access to collocation list via text.collocation_list()
  * support corenlp server options
  * drop support for Python 3.4
  * other minor fixes

OBS-URL: https://build.opensuse.org/request/show/705011
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=20
2019-05-23 13:19:13 +00:00
Stephan Kulow
e0385b0944 Accepting request 673240 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/673240
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=3
2019-02-24 16:14:05 +00:00
Tomáš Chvátal
6464a76f6e Accepting request 673158 from home:jayvdb:coala
- Remove Python 3 dependency on singledispatch

OBS-URL: https://build.opensuse.org/request/show/673158
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=18
2019-02-11 08:14:51 +00:00
Tomáš Chvátal
681ed998c4 Accepting request 673106 from home:jayvdb:nltk_data
- Update to v3.4
  + Support Python 3.7
  + New Language Modeling package
  + Cistem Stemmer for German
  + Support Russian National Corpus incl POS tag model
  + Krippendorf Alpha inter-rater reliability test
  + Comprehensive code clean-ups
  + Switch continuous integration from Jenkins to Travis
- from v3.3
  + Support Python 3.6
  + New interface to CoreNLP
  + Support synset retrieval by sense key
  + Minor fixes to CoNLL Corpus Reader
  + AlignedSent
  + Fixed minor inconsistencies in APIs and API documentation
  + Better conformance to PEP8
  + Drop Moses Tokenizer (incompatible license)

OBS-URL: https://build.opensuse.org/request/show/673106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=17
2019-02-10 10:26:05 +00:00
Todd R
3c4a16620a Accepting request 672086 from home:jayvdb:branches:devel:languages:python
- Add missing dependency six
- Remove unnecessary build dependency six
- Recommend all optional dependencies

OBS-URL: https://build.opensuse.org/request/show/672086
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=16
2019-02-08 16:57:42 +00:00
Dominique Leuenberger
80857eec07 Accepting request 603179 from devel:languages:python
- Trim redundant wording from description.

OBS-URL: https://build.opensuse.org/request/show/603179
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=2
2018-05-04 09:29:27 +00:00
Dominique Leuenberger
20df3fd6f7 Accepting request 583014 from devel:languages:python
NLTK -- the Natural Language Toolkit -- is a suite of open source Python modules, data sets and tutorials supporting research and development in Natural Language Processing.

OBS-URL: https://build.opensuse.org/request/show/583014
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nltk?expand=0&rev=1
2018-03-07 09:35:19 +00:00
Tomáš Chvátal
04232172fe Accepting request 583689 from home:jengelh:branches:devel:languages:python
- Trim redundant wording from description.

OBS-URL: https://build.opensuse.org/request/show/583689
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=13
2018-03-06 20:46:53 +00:00
Tomáš Chvátal
2ba322446c Accepting request 582986 from home:badshah400:branches:devel:languages:python
- Use \%license instead of \%doc to install License.txt.

OBS-URL: https://build.opensuse.org/request/show/582986
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=12
2018-03-05 15:31:28 +00:00
Tomáš Chvátal
34da969769 Accepting request 571333 from home:RZLourenco:branches:devel:languages:python
- Depend on the full python interpreter to fix sqlite3 import
  during %check

OBS-URL: https://build.opensuse.org/request/show/571333
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=11
2018-01-31 11:40:02 +00:00
Tomáš Chvátal
2b2a542364 Accepting request 566372 from home:RZLourenco:branches:devel:languages:python
- Depend on python-rpm-macros
- Build for both Python2 and Python3

OBS-URL: https://build.opensuse.org/request/show/566372
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=10
2018-01-16 11:13:02 +00:00
75a9f175cc Accepting request 558587 from home:badshah400:branches:devel:languages:python
- Update to version 3.2.5:
  * Arabic stemmers (ARLSTem, Snowball)
  * NIST MT evaluation metric and added NIST
    international_tokenize
  * Moses tokenizer
  * Document Russian tagger
  * Fix to Stanford segmenter
  * Improve treebank detokenizer, VerbNet, Vader
  * Misc code and documentation cleanups
  * Implement fixes suggested by LGTM
- Convert specfile to python single-spec style.
- Drop unneeded BuildRequires: python-PyYAML, python-xml,
  python-devel; not required for building.
- Change existing Requires to Recommends: these are really needed
  for additional features, and not required for basic nltk usage.
- Add new Recommends: python-scipy, python-matplotlib,
  python-pyparsing, and python-gensim; enables other optional
  features.
- Run fdupes to link-up duplicate files.
- Remove exec permissions for a file not intended to be executed
  (not in exec path, no hashbang, etc.)
- Remove hashbangs from non-executable files.
- Run tests following the suggestion from
  http://www.nltk.org/install.html.

OBS-URL: https://build.opensuse.org/request/show/558587
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=9
2017-12-19 18:48:40 +00:00
d90d33d859 Accepting request 459509 from home:cyberiad:branches:devel:languages:python
update to version 3.2.2

OBS-URL: https://build.opensuse.org/request/show/459509
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=8
2017-03-01 11:23:50 +00:00
95be8e707d Accepting request 435028 from home:TheBlackCat:branches:devel:languages:python
Update to version 3.2.1

OBS-URL: https://build.opensuse.org/request/show/435028
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=7
2016-10-15 13:47:44 +00:00
Todd R
69f054332b Accepting request 308503 from home:TheBlackCat:branches:devel:languages:python
Update to version 3.0.2

OBS-URL: https://build.opensuse.org/request/show/308503
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=6
2015-05-24 11:04:50 +00:00
Denisart Benjamin
05e79db05a Accepting request 209813 from home:posophe:branches:devel:languages:python
update

OBS-URL: https://build.opensuse.org/request/show/209813
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=5
2013-12-08 13:34:47 +00:00
Sascha Peilicke
b77989d251 - Require python-setuptools instead of distribute (upstreams merged)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=4
2013-10-24 11:09:21 +00:00
Sascha Peilicke
fa205a413e - Update to version 2.0.1rc1
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=3
2011-09-23 12:31:44 +00:00
Jan Matejek
f3752dd71f Accepting request 31723 from home:Odd-rationale
Copy from home:Odd-rationale/python-nltk via accept of submit request 31723 revision 2.
Request was accepted with message:
reviewed ok

OBS-URL: https://build.opensuse.org/request/show/31723
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=2
2010-02-26 10:34:38 +00:00
Stephan Kulow
509876b0ce Accepting request 26228 from home:Odd-rationale
Copy from home:Odd-rationale/python-nltk via accept of submit request 26228 revision 7.
Request was accepted with message:
looks good to me

OBS-URL: https://build.opensuse.org/request/show/26228
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nltk?expand=0&rev=1
2010-01-15 14:00:38 +00:00
11 changed files with 79 additions and 320 deletions

View File

@ -1,104 +0,0 @@
---
nltk/app/chartparser_app.py | 13 +++++++++++++
nltk/corpus/reader/util.py | 2 ++
nltk/data.py | 2 ++
nltk/parse/transitionparser.py | 2 ++
nltk/tbl/demo.py | 4 +++-
5 files changed, 22 insertions(+), 1 deletion(-)
--- a/nltk/app/chartparser_app.py
+++ b/nltk/app/chartparser_app.py
@@ -800,6 +800,10 @@ class ChartComparer:
showerror("Error Saving Chart", f"Unable to open file: {filename!r}\n{e}")
def load_chart_dialog(self, *args):
+ showerror("Security Error",
+ "Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
+ return
filename = askopenfilename(
filetypes=self.CHART_FILE_TYPES, defaultextension=".pickle"
)
@@ -811,6 +815,8 @@ class ChartComparer:
showerror("Error Loading Chart", f"Unable to open file: {filename!r}\n{e}")
def load_chart(self, filename):
+ raise RuntimeError("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
with open(filename, "rb") as infile:
chart = pickle.load(infile)
name = os.path.basename(filename)
@@ -2268,6 +2274,10 @@ class ChartParserApp:
if not filename:
return
try:
+ showerror("Security Error",
+ "Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
+ return
with open(filename, "rb") as infile:
chart = pickle.load(infile)
self._chart = chart
@@ -2306,6 +2316,9 @@ class ChartParserApp:
return
try:
if filename.endswith(".pickle"):
+ showerror("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
+ return
with open(filename, "rb") as infile:
grammar = pickle.load(infile)
else:
--- a/nltk/corpus/reader/util.py
+++ b/nltk/corpus/reader/util.py
@@ -521,6 +521,8 @@ class PickleCorpusView(StreamBackedCorpu
def read_block(self, stream):
result = []
+ raise RuntimeError("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
for i in range(self.BLOCK_SIZE):
try:
result.append(pickle.load(stream))
--- a/nltk/data.py
+++ b/nltk/data.py
@@ -752,6 +752,8 @@ def load(
if format == "raw":
resource_val = opened_resource.read()
elif format == "pickle":
+ raise RuntimeError("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
resource_val = pickle.load(opened_resource)
elif format == "json":
import json
--- a/nltk/parse/transitionparser.py
+++ b/nltk/parse/transitionparser.py
@@ -553,6 +553,8 @@ class TransitionParser(ParserI):
"""
result = []
# First load the model
+ raise RuntimeError("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
model = pickle.load(open(modelFile, "rb"))
operation = Transition(self._algorithm)
--- a/nltk/tbl/demo.py
+++ b/nltk/tbl/demo.py
@@ -253,6 +253,8 @@ def postag(
)
)
with open(cache_baseline_tagger) as print_rules:
+ raise RuntimeError("Due to gh#nltk/nltk#3266, deserializing from " +
+ "a pickle is forbidden.")
baseline_tagger = pickle.load(print_rules)
print(f"Reloaded pickled tagger from {cache_baseline_tagger}")
else:
@@ -327,7 +329,7 @@ def postag(
with open(serialize_output) as print_rules:
brill_tagger_reloaded = pickle.load(print_rules)
print(f"Reloaded pickled tagger from {serialize_output}")
- taggedtest_reloaded = brill_tagger.tag_sents(testing_data)
+ taggedtest_reloaded = brill_tagger_reloaded.tag_sents(testing_data)
if taggedtest == taggedtest_reloaded:
print("Reloaded tagger tried on test set, results identical")
else:

View File

@ -1,38 +0,0 @@
From a12d0a6a8cdba58d5e4e5f92ac62bb80fc26c624 Mon Sep 17 00:00:00 2001
From: Eric Kafe <kafe.eric@gmail.com>
Date: Tue, 23 Jul 2024 09:09:09 +0200
Subject: [PATCH] Prevent data.load from unpickling classes or functions
---
nltk/data.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/nltk/data.py b/nltk/data.py
index cc9229b0a2..fb242721c5 100644
--- a/nltk/data.py
+++ b/nltk/data.py
@@ -658,6 +658,15 @@ def retrieve(resource_url, filename=None, verbose=True):
}
+def restricted_pickle_load(string):
+ """
+ Prevents any class or function from loading.
+ """
+ from nltk.app.wordnet_app import RestrictedUnpickler
+
+ return RestrictedUnpickler(BytesIO(string)).load()
+
+
def load(
resource_url,
format="auto",
@@ -751,7 +760,7 @@ def load(
if format == "raw":
resource_val = opened_resource.read()
elif format == "pickle":
- resource_val = pickle.load(opened_resource)
+ resource_val = restricted_pickle_load(opened_resource.read())
elif format == "json":
import json

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/nltk/nltk</param>
<param name="scm">git</param>
<param name="exclude">web/*</param>
<param name="version">3.9.1</param>
<param name="revision">3.9.1</param>
</service>
<service mode="manual" name="set_version" />
<service mode="buildtime" name="tar" />
<service mode="buildtime" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:676970e2b7aa0a7184e68f76e0c4f2756fd1b82559a509d5656a23117faeb658
size 2867926

3
nltk-3.9.1.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1b59894ed0a2eebbb64fc4e0975216a5a7e1a949e61b9a4f22693e15536ff05
size 8269325

View File

@ -1,110 +0,0 @@
From 25d35fc4283dedd2053ec6d821f4b707fff8d72c Mon Sep 17 00:00:00 2001
From: Konstantin Chernyshev <k4black@ya.ru>
Date: Thu, 16 Nov 2023 19:00:15 +0100
Subject: [PATCH 1/8] ci: enable 3.12 in ci tests
---
.github/workflows/ci.yaml | 2 +-
README.md | 2 +-
nltk/test/unit/translate/test_bleu.py | 1 -
nltk/translate/bleu_score.py | 29 +++++++++++++++++++++++++++--
setup.py | 3 ++-
5 files changed, 31 insertions(+), 6 deletions(-)
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -76,7 +76,7 @@ jobs:
needs: [cache_nltk_data, cache_third_party]
strategy:
matrix:
- python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
+ python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
NLTK -- the Natural Language Toolkit -- is a suite of open source Python
modules, data sets, and tutorials supporting research and development in Natural
-Language Processing. NLTK requires Python version 3.7, 3.8, 3.9, 3.10 or 3.11.
+Language Processing. NLTK requires Python version 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.
For documentation, please visit [nltk.org](https://www.nltk.org/).
--- a/nltk/test/unit/translate/test_bleu.py
+++ b/nltk/test/unit/translate/test_bleu.py
@@ -2,7 +2,6 @@
Tests for BLEU translation evaluation metric
"""
-import io
import unittest
from nltk.data import find
--- a/nltk/translate/bleu_score.py
+++ b/nltk/translate/bleu_score.py
@@ -7,16 +7,41 @@
# For license information, see LICENSE.TXT
"""BLEU score implementation."""
-
import math
import sys
import warnings
from collections import Counter
-from fractions import Fraction
+from fractions import Fraction as _Fraction
from nltk.util import ngrams
+class Fraction(_Fraction):
+ """Fraction with _normalize=False support for 3.12"""
+
+ def __new__(cls, numerator=0, denominator=None, _normalize=False):
+ if sys.version_info >= (3, 12):
+ self = super().__new__(cls, numerator, denominator)
+ else:
+ self = super().__new__(cls, numerator, denominator, _normalize=_normalize)
+ self._normalize = _normalize
+ self._original_numerator = numerator
+ self._original_denominator = denominator
+ return self
+
+ @property
+ def numerator(self):
+ if not self._normalize:
+ return self._original_numerator
+ return super().numerator
+
+ @property
+ def denominator(self):
+ if not self._normalize:
+ return self._original_denominator
+ return super().denominator
+
+
def sentence_bleu(
references,
hypothesis,
--- a/setup.py
+++ b/setup.py
@@ -67,7 +67,7 @@ setup(
},
long_description="""\
The Natural Language Toolkit (NLTK) is a Python package for
-natural language processing. NLTK requires Python 3.7, 3.8, 3.9, 3.10 or 3.11.""",
+natural language processing. NLTK requires Python 3.7, 3.8, 3.9, 3.10, 3.11 or 3.12.""",
license="Apache License, Version 2.0",
keywords=[
"NLP",
@@ -100,6 +100,7 @@ natural language processing. NLTK requi
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",

4
nltk.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: nltk
version: 3.9.1
mtime: 1724010420
commit: aca78cb2add4084f76b9eac921d8a73927d7a086

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f79462ac99f414b4850943720bed4a59c1bb15bfc8f1ce16b26165da6db07680
size 393271816

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Tue Oct 29 08:37:43 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Use _service to download source and exclude documentation that has
non-commercial license (boo#1232448)
- Remove nltk_data to avoid redistribution of files with
non-commercial (boo#1232448):
> NLTK corpora are provided under the terms given in the README file
> for each corpus; all are redistributable and available for
> non-commercial use.
- Remove not needed skip-networked-test.patch
-------------------------------------------------------------------
Mon Sep 30 21:17:21 UTC 2024 - Thiago Bertoldi <thiago.bertoldi@suse.com>
- Update to to 3.9.1 (changes since 3.8.1):
* Fixed bug that prevented wordnet from loading
* Fix security vulnerability CVE-2024-39705 (breaking change)
* Replace pickled models (punkt, chunker, taggers) by new
pickle-free "_tab" packages
* No longer sort Wordnet synsets and relations (sort in calling
function when required)
* Only strip the last suffix in Wordnet Morphy, thus
restricting synsets() results
* Add Python 3.12 support
* Many other minor fixes
- Refresh nltk_data
- Remome upstreamed patches:
- CVE-2024-39705.patch
- nltk-pr3207-py312.patch
-------------------------------------------------------------------
Fri Jul 26 07:14:33 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
@ -36,8 +67,7 @@ Tue Mar 28 08:36:04 UTC 2023 - pgajdos@suse.com
-------------------------------------------------------------------
Fri Jan 6 15:32:43 UTC 2023 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 3.8
- Update to 3.8
* Refactor dispersion plot (#3082)
* Provide type hints for LazyCorpusLoader variables (#3081)
* Throw warning when LanguageModel is initialized with incorrect vocabulary (#3080)
@ -72,7 +102,7 @@ Fri Jan 6 15:32:43 UTC 2023 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
* Fix LC cutoff policy of text tiling (#2936)
* Optimize ConditionalFreqDist.__add__ performance (#2939)
* Add Markdown corpus reader (#2902)
-------------------------------------------------------------------
Mon Dec 26 10:41:22 UTC 2022 - Matej Cepl <mcepl@suse.com>
@ -390,7 +420,7 @@ Fri Sep 23 12:29:05 UTC 2011 - saschpe@suse.de
-------------------------------------------------------------------
Sun Feb 7 18:51:07 CST 2010 - oddrationale@gmail.com
- fixed copyright and license statements
- removed PyYAML, and added dependency to installers and download
instructions
@ -412,6 +442,6 @@ Thu Dec 10 17:23:51 CST 2009 - oddrationale@gmail.com
- added Requires: python-yaml
-------------------------------------------------------------------
Wed Dec 9 15:39:35 CST 2009 - oddrationale@gmail.com
Wed Dec 9 15:39:35 CST 2009 - oddrationale@gmail.com
- Initial Release (Version 2.0b7): Sun Feb 7 18:50:18 CST 2010

View File

@ -17,14 +17,17 @@
%define modname nltk
%{?sle15_python_module_pythons}
Name: python-nltk
Version: 3.8.1
Version: 3.9.1
Release: 0
Summary: Natural Language Toolkit
License: Apache-2.0
URL: http://nltk.org/
# SourceRepository: https://github.com/nltk/nltk
Source0: https://github.com/nltk/%{modname}/archive/refs/tags/%{version}.tar.gz#/%{modname}-%{version}.tar.gz
# The _service download the source and repack without some doc files
# that has non-commercial license. boo#1232448
Source0: nltk-%{version}.tar.xz
# Download/Update NLTK data:
# quilt setup python-nltk.spec
# pushd nltk-?.?.?
@ -56,15 +59,12 @@ Source0: https://github.com/nltk/%{modname}/archive/refs/tags/%{version}.
# tar -cJf ../nltk_data.tar.xz nltk_data
# popd
# see https://www.nltk.org/data.html for more details
Source1: nltk_data.tar.xz
########### NOTICE #########
# Do not distribute nltk_data.tar.xz because it's licensed under
# non-commercial, boo#1232448
############################
# Source1: nltk_data.tar.xz
Source99: python-nltk.rpmlintrc
# PATCH-FIX-UPSTREAM skip-networked-test.patch gh#nltk/nltk#2969 mcepl@suse.com
# skip tests requiring network connection
Patch0: skip-networked-test.patch
# PATCH-FIX-UPSTREAM nltk-pr3207-py312.patch gh#nltk/nltk#3207
Patch1: nltk-pr3207-py312.patch
# PATCH-FIX-UPSTREAM CVE-2024-39705.patch bsc#1227174 gh#nltk/nltk#3290
Patch2: CVE-2024-39705.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
@ -121,7 +121,7 @@ Python modules, data sets and tutorials supporting research and
development in Natural Language Processing.
%prep
%setup -q -a1 -n %{modname}-%{version}
%setup -q -n %{modname}-%{version}
# Fix EOL
sed -i 's/\r/\n/g; s/\n$//' \
@ -150,7 +150,6 @@ sed -E -i "/#![[:space:]]*\/usr\/bin\/env python/d" \
sed -E -i "s|#![[:space:]]*%{_bindir}/env python|#!%{_bindir}/python3|" \
setup.py \
tools/global_replace.py \
nltk_data/corpora/pl196x/splitter.py \
tools/find_deprecated.py
%autopatch -p1
@ -166,15 +165,16 @@ sed -E -i "s|#![[:space:]]*%{_bindir}/env python|#!%{_bindir}/python3|" \
chmod -x %{buildroot}%{$python_sitelib}/nltk/test/dependency.doctest
}
%check
export NLTK_DATA=$(readlink -f ./nltk_data/)
# export PYTEST_ADDOPTS="--doctest-modules"
# Skip tests requiring pickle.load gh#nltk/nltk#3266 (CVE-2024-39705)
skip_tests=" or test_basic or test_increment or test_pad_asterisk or test_pad_dotdot"
skip_tests+=" or test_pos_tag_eng or test_pos_tag_eng_universal or test_pos_tag_rus"
skip_tests+=" or test_pos_tag_rus_universal or test_pos_tag_unknown_lang"
skip_tests+=" or test_sent_tokenize or test_unspecified_lang or test_word_tokenize"
%pytest -k "not (network ${skip_tests})"
# Do not test, there's no ntlk_data, boo#1232448
# %%check
# export NLTK_DATA=$(readlink -f ./nltk_data/)
# # export PYTEST_ADDOPTS="--doctest-modules"
# # Skip tests requiring pickle.load gh#nltk/nltk#3266 (CVE-2024-39705)
# skip_tests=" or test_basic or test_increment or test_pad_asterisk or test_pad_dotdot"
# skip_tests+=" or test_pos_tag_eng or test_pos_tag_eng_universal or test_pos_tag_rus"
# skip_tests+=" or test_pos_tag_rus_universal or test_pos_tag_unknown_lang"
# skip_tests+=" or test_sent_tokenize or test_unspecified_lang or test_word_tokenize"
# %%pytest -k "not (network ${skip_tests})"
%post
%python_install_alternative nltk

View File

@ -1,35 +0,0 @@
---
nltk/test/unit/test_downloader.py | 4 ++++
setup.cfg | 4 ++++
2 files changed, 8 insertions(+)
--- a/nltk/test/unit/test_downloader.py
+++ b/nltk/test/unit/test_downloader.py
@@ -1,6 +1,9 @@
from nltk import download
+import pytest
+
+@pytest.mark.network
def test_downloader_using_existing_parent_download_dir(tmp_path):
"""Test that download works properly when the parent folder of the download_dir exists"""
@@ -9,6 +12,7 @@ def test_downloader_using_existing_paren
assert download_status is True
+@pytest.mark.network
def test_downloader_using_non_existing_parent_download_dir(tmp_path):
"""Test that download works properly when the parent folder of the download_dir does not exist"""
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,7 @@
+[tool:pytest]
+markers =
+ network: test case requires network connection
+
[metadata]
license_files =
LICENSE.txt