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

count(s) and term_frequency(s) #61

Closed
jbesomi opened this issue Jul 10, 2020 · 1 comment · Fixed by #92
Closed

count(s) and term_frequency(s) #61

jbesomi opened this issue Jul 10, 2020 · 1 comment · Fixed by #92
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jbesomi
Copy link
Owner

jbesomi commented Jul 10, 2020

Texthero's hero.term_frequency(s) should be reanamed hero.count(s) as in reality it just count the term.
Because of that, we should add another function that implements hero.term_frequency that is: "(number of times term t appears in a document) / (Total number of terms in the document).

The distinctions between the two should be made clear in both docstring and both functions should have a "See Also" to let the user quickly move from one function documentation to the other.

Both implementations might be written using scikit-learn CountVectorizer.

@jbesomi jbesomi added enhancement New feature or request good first issue Good for newcomers labels Jul 10, 2020
@avinashbhat
Copy link
Contributor

If I understand correctly, the existing term_frequency method has to be renamed to count without any modification except that in the docstring, and another term_frequency method needs to be defined?

@jbesomi jbesomi linked a pull request Jul 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants