Comments (3)
Hello!
The function's parameter is supposed to be a tuple.
It can also be a list of tuples, as explained in the docstring. I suspect that the author of this piece of code lived by the EAFP principle for Python, causing this code to not be so strange at all. Beyond that, NLTK lives by a garbage-in-garbage-out rule, so incorrectly typed inputs can't be expected to work.
That all said, I'll resolve your issue by replacing except TypeError
with just except
, but in the future I would watch your writing tone with these bug reports.
- Tom Aarsen
from nltk.
@tomaarsen Oops. Sorry for the wrong tone of bug reports and my carelessness. I changed it. Thanks for your support.
from nltk.
I appreciate it, no hard feelings 😄
from nltk.
Related Issues (20)
- Trouble with installation importing nltk HOT 1
- Add support for a `sort` argument in WordNet methods
- Unable to download Stopwords and also unable to access stopwords zip file manually. HOT 2
- Add a function of splitting combined words.
- Problems Running Examples Starting with Babelize HOT 1
- NLTK thinks `turn` is a noun when it shoud be a verb. HOT 1
- NLTK is considering "hi" and "hello" as a noun. HOT 4
- Import of Trie fails in mwe.py HOT 1
- ToktokTokenizer doesn't call one of the included replacement patterns and thus doesn't tokenize some punctuation, like opening guillemets HOT 1
- Bug in nltk.draw.dispersion_plot with nltk 3.8.1, matplotlib-base 3.8.0, matplotlib-inline 0.1.6 and numpy 1.26 HOT 2
- Tokenizer punkt zip file sometimes does not unpackage
- `TreebankWordDetokenizer().detokenize()` introduces unexpected spaces before periods.
- KneserNeyInterpolated has problem with OOV words during testing and perplexity is always inf HOT 7
- Dispersion Plot was not populating in correct order on Y axis. I have corrected that order. Please use the below code in dispersion.py file. HOT 2
- Not able to download the NLTK data module (python as well as manual download) HOT 2
- import error with numpy 1.24.4 HOT 3
- A potential edge case for WordNetLemmatizer.lemmatize() HOT 1
- module 'nltk' has no attribute 'data HOT 2
- Fraction object creation fails with extra kwargs in bleu_score.py HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nltk.