mapping problem

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Feb 16 05:35:27 EST 2008


On Sat, 16 Feb 2008 01:35:32 -0800, Mr Shore wrote:

> I've now crawled the meta infor,but with multi name all means the same
> thing,
> such as MS,microsoft,microsoft corporation all means the same thing, how
> can I mapping words like this to the same thing?

The same way you would map anything: use a dict.

You know, sometimes I'm astounded by the ability of the human brain to 
find semantic meaning in what is grammatically and syntactically 
gibberish. Most of the words are English, but putting them all together 
makes no sense. And yet, by interpolating between key words, I can guess 
that the poster wants something like this:

mapping = {"MS": "Microsoft", "Microsoft": "Microsoft", 
"Microsoft Corporation": "Microsoft"}

If I have guessed poorly, could you please try again, more carefully? If 
you're not a native English speaker, please say so and we'll make 
allowances, and if you are a native English speaker with no cognitive 
disabilities, you should be ashamed of wasting our time with such poor 
communication.



-- 
Steven
who is unapologetic for being grumpy about the oxygen-thieves using the 
Internet these days, and if that makes me a curmudgeon, so be it.



More information about the Python-list mailing list