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

Update extract_keywords_from_text behaviour to match rake-nltk #13

Open
andrewrosss opened this issue Mar 10, 2021 · 0 comments
Open

Update extract_keywords_from_text behaviour to match rake-nltk #13

andrewrosss opened this issue Mar 10, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@andrewrosss
Copy link
Owner

As brought up in #12 it probably makes sense to have part of the API return a deduped version of the ranklist.

Specifically, the proposal is to have Rake.extract_keywords_from_text return a ranklist of type List[Tuple[float, str]]. This ranklist could then be reasonably deduped (as the default behaviour). The other similar method Rake.apply would continue to return a list of type List[Tuple[float, Span]].

So in a nutshell the proposed change to the API would be:

class Rake:

    def extract_keywords_from_text(self, text: str, dedup: bool = True) -> List[Tuple[float, str]]:
        ...

    def apply(self, text: str) -> List[Tuple[float, spacy.tokens.Span]]:
        ...
@andrewrosss andrewrosss added the enhancement New feature or request label Mar 10, 2021
@andrewrosss andrewrosss added this to the 0.4.0 milestone Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant