I need an efficient synonym replacement function.? It needs to replace all english synonym words found in a string of text? randomly and efficiently. I will be calling this function over 100k times a day. I want to prevent having excessive hard drive reads.
? You would be responsible for the following:
* Function must be quick and efficient as it will be called over 100k times a day.
* I want to prevent making disk reads every time it is called. Maybe it can be cached into memory or simply just be a large php file or MYSQL database with all the synonyms listed. Let me know what method you would choose to be most efficient?
* Database:? [url removed, login to view]
* Replace all found words with? random synonym? replacement of words. ?
* If possible and not to much overhead: Retain character case.? Preserv present, past tense and future tense of words.
Example of random replacement of words:? If you have a list of common words such as (buy, purchase, acquire). The script finds the word (buy) with in the block of text, it needs to randomly replace the word buy with either of the other two synonym words.
? The script also requires a replacement of capitol letters in words. If the word (Buy) is replaced with purchase it also needs to read (Purchase) and NOT (purchase).