vi3k6i5 / flashtext

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

Question: Does this package support pattern matching 40k words and replacing it if it's found in a sentence? #95

Closed anukadur closed 4 years ago

anukadur commented 4 years ago

Hi,

This is not an issue. Just a question to understand if the package is feasible to solve the issue I'm facing.

There are 40k words (which has unique id's) and 40k sentences. If any of these words are found in any of the sentences, I have to replace the word with the word and its id. The catch is we need to retain the same case as in the sentence.

For e.g. Word is "Information Security" The sentence is "information security is also called InfoSec."

The expected output is "information security/1 is also called InfoSec."

Can this scenario be handled with the help of this package? By looping through all the sentences?

Thanks!

doubledrat commented 4 years ago

I believe so, yes. I've used it for 29k words

thakur-nandan commented 4 years ago

Closing this issue due to inactivity.