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

How to get the new text after keywords are removed? #128

Open
lingvisa opened this issue Jan 22, 2022 · 1 comment
Open

How to get the new text after keywords are removed? #128

lingvisa opened this issue Jan 22, 2022 · 1 comment

Comments

@lingvisa
Copy link

>>> keyword_processor.remove_keywords_from_dict({"product management": ["PM"]})
>>> keyword_processor.remove_keywords_from_list(["java programing"])
>>> keyword_processor.extract_keywords('I am a product manager for a java_2e platform')

These all returns extracted words after the removal. But how to get the NEW sentence after the keywords are removed? It seems it doesn't modify the original text. How can I get the new sentence?

@AbrJA
Copy link

AbrJA commented Jun 23, 2022

Hi, it's on the documentation

>>> keyword_processor.add_keyword('New Delhi', 'NCR region')
>>> new_sentence = keyword_processor.replace_keywords('I love Big Apple and new delhi.')
>>> new_sentence
>>> # 'I love New York and NCR region.'

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