Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples keyword arg ignored in FreqDist.tabulate #2356

Closed
rdbliss opened this issue Aug 5, 2019 · 2 comments
Closed

samples keyword arg ignored in FreqDist.tabulate #2356

rdbliss opened this issue Aug 5, 2019 · 2 comments
Assignees
Labels

Comments

@rdbliss
Copy link

rdbliss commented Aug 5, 2019

It looks like the samples keyword argument mentioned in the docstring of FreqDist.tabulate() is ignored. Is this the intended behavior?

Here are the arguments from the docstring:

:param samples: The samples to plot (default is all samples)
:type samples: list
:param cumulative: A flag to specify whether the freqs are cumulative (default = False)
:type title: bool

Here's an example of samples being ignored:

from nltk import FreqDist

fd = FreqDist(["foo", "bar"])
# I expect to get just "foo", but get "foo" *and* "bar".
fd.tabulate(samples=["foo"])

This is different from what ConditionalFreqDist.tabulate() does, so I'm not sure what's intended here. Either way, it would be nice for the docstring to be clearer.

@stevenbird stevenbird self-assigned this Aug 12, 2019
@stevenbird stevenbird added the bug label Aug 12, 2019
@anantvir
Copy link
Contributor

Can I start working on this ?

@stevenbird
Copy link
Member

Thanks @anantvir.
(Resolved in #2469)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants