[BangPypers] How should I do it?
Kenneth Gonsalves
lawgon at thenilgiris.com
Fri Jan 15 07:53:12 CET 2010
On Friday 15 Jan 2010 12:01:56 pm Eknath Venkataramani wrote:
> and I need to extract "confident" , "ashahvasahta" from the first
> record, "consumers", "upabhaokahtaa" from the second record...
> i.e. "word in english" and the "first word in the probable-translations"
>
#!/usr/bin/python
words = [{'english':"confident",
'count' : 4,
'trans' : [
("ashahvasahta" , 0.74918568),
("atahmavaishahvaasa" , 0.09095465),
("pahraaram\.nbha" , 0.06990729),
("mailatae" , 0.02856427),
("utanai" , 0.01929341),
("anaa" , 0.01578552),
("uthaanae" , 0.01403157),
("jaitanae" , 0.01227762),
],
},
{'english':"consumers",
'count' : 4,
'trans' : [
("upabhaokahtaa" , 0.75144362),
("upabhaokahtaaom\.n" , 0.12980166),
]
},
{ 'english':"a",
'count' : 1164,
'trans' : [
("eka" , 0.14900491),
("kaisai" , 0.08834675),
("haai" , 0.06774697),
("kaoi" , 0.05394308),
("kai" , 0.04981982),
("\(none\)" , 0.04400085),
("kaa" , 0.03726579),
("kae" , 0.03446450),
],
}
]
for word in words:
print word['english'],word['trans'][0][0]
--
regards
kg
http://lawgon.livejournal.com
More information about the BangPypers
mailing list