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

The ngram size parameter (n) in redundancy calculation seems not used #2

Open
rordi opened this issue Dec 3, 2023 · 1 comment
Open

Comments

@rordi
Copy link

rordi commented Dec 3, 2023

Thank your for the wonderful work provided in the MoreThanSentiments package.

The function parameter n of the Redundancy method seems not used towards the ngram size, as the ngram size is hardcoded to 10 in the following line:

ngram[i][j] = list(nltk.ngrams(input_data[i][j].split(),10))

As the original publication (Cazier and Pfeiffer, 2015) was based on rather long documents, the 10-gram was probably ok in that context. When dealing with shorter documents, it would be useful for users to be able to work with a smaller ngram size.

@jinhangjiang
Copy link
Owner

@rordi you are right. We will fix it soon. Thank you for pointing that out! Will get back to you on this thread once the bug is fixed.

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

No branches or pull requests

2 participants