[Ilugc] What data structure in python should I use

  • From: sesharudhran@xxxxxxxxx (Balaji Abiraman)
  • Date: Fri Jan 15 10:43:56 2010

Hi,

I hope "dictionary" feature will be more useful and relevant to this
scenario.

Warm Regards,

Bala

On Fri, Jan 15, 2010 at 10:28 AM, Eknath Venkataramani <
eknath.iyer@xxxxxxxxx> wrote:

I have a txt file in the following format:
[code]
"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,
   },
},
"consumers" => {
 count => 4,
 trans => {
   "upabhaokahtaa" => 0.75144362,
   "upabhaokahtaaom\.n" => 0.12980166,
   "sauda\?\?\?dha" => 0.11875471,
   },
},
"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,
   },
},
[/code]

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"

Thanks is advance
Eknath
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Other related posts: