vi3k6i5 / flashtext

Extract Keywords from sentence or Replace keywords in sentences.
MIT License
5.58k stars 598 forks source link

Can we have pattern matching add to KeywordProcessor #115

Closed Rammurthy5 closed 4 years ago

Rammurthy5 commented 4 years ago

For eg. I have a file, and need to find "SOMETHING RETURN(2020/07/07)=45%" I can obviously add SOMETHING RETURN as a keyword to the processor. But the date within the brackets, and the percentage number keeps changing from time to time. Please tell me if there is a way to add Pattern based keywords to KeywordProcessor() method.

vi3k6i5 commented 4 years ago

Please go for regex.

On Wed, Jul 8, 2020 at 11:04 AM RAMMURTY S notifications@github.com wrote:

For eg. I have a file, and need to find "SOMETHING RETURN(2020/07/07)=45%" I can obviously add SOMETHING RETURN as a keyword to the processor. But the date within the brackets, and the percentage number keeps changing from time to time. Please tell me if there is a way to add Pattern based keywords to KeywordProcessor() method.

— 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/115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXY3QRYQISQJV5IHF5IP6DR2QANZANCNFSM4OUF4BPQ .

--

Vikash

Rammurthy5 commented 4 years ago

Closing this issue, going with RegEx.