flashtext
flashtext copied to clipboard
how to do
keyword_processor = KeywordProcessor() keyword_processor.add_keyword('Big Apple','Big_Apple') keyword_processor.add_keyword('Apple and','Apple_and') keyword_processor.replace_keywords(u'I love Big Apple and Bay Area.')
result: u'I love Big_Apple and Bay Area.' but i want the result is :u'I love Big_Apple_and Bay Area.'
how to do?
You have to use
keyword_processor.add_keyword('Big Apple ','Big_Apple_')
There is a space after 'Big Apple
On Sun 27 May, 2018, 07:33 Leepand, [email protected] wrote:
keyword_processor = KeywordProcessor() keyword_processor.add_keyword('Big Apple','Big_Apple') keyword_processor.add_keyword('Apple and','Apple_and') keyword_processor.replace_keywords(u'I love Big Apple and Bay Area.')
result: u'I love Big_Apple and Bay Area.' but i want the result is :u'I love Big_Apple_and Bay Area.'
how to do?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vi3k6i5/flashtext/issues/52, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-NwuKp7D0kNrC1GVmSCju2TbT7c2ehks5t2gldgaJpZM4UPHfu .