How to get the new text after keywords are removed?
lingvisa opened this issue · 1 comments
lingvisa commented
>>> 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 commented
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.'