Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Efficient selective substitution on list of words

by repellent (Priest)
on Jan 31, 2010 at 05:56 UTC ( #820547=note: print w/ replies, xml ) Need Help??


in reply to Efficient selective substitution on list of words

my %words = ( score => { replacement => 'twenty', stopwords => { fourscore => 1, scored => 1, scores => 1, }, }, core => { replacement => 'center', stopwords => { encore => 1, coreagent => 1, }, }, centre => { replacement => 'center', stopwords => { }, }, ... );

If you have the data structure above, you may have enough to construct an efficient logic needed to achieve your task.


Comment on Re: Efficient selective substitution on list of words
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://820547]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2014-10-25 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls