SHA256
1
0
forked from pool/python-nltk

Compare commits

...

49 Commits

Author SHA256 Message Date
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

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: