Re: table (ascii text) lin ayout recognition

2006-09-13 Thread bearophileHUGS
Here you can find an improved version: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498093 -- http://mail.python.org/mailman/listinfo/python-list

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread Paul McGuire
"James Stroud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> Hello, >> >> I am looking for python code useful to process >> tables that are in ASCII text. The code must >> determine where are the columns (fields). >> Concerned tables for my application a

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread bearophileHUGS
My version, not much tested. It probably doesn't work well for tables with few rows. It finds the most frequent word beginnings, and then splits the data according to them. data = """\ 44544 ipod apple black 102 GFGFHHF-12 unknown thing bizar brick mortar tbc 45fjk

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread James Stroud
James Stroud wrote: > indices = [t for t in zip(indices[::2],indices[1::2])] (Artefact of cut-and-paste.) Make that: indices = zip(indices[::2],indices[1::2]) James -- http://mail.python.org/mailman/listinfo/python-list

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hello, > > I am looking for python code useful to process > tables that are in ASCII text. The code must > determine where are the columns (fields). > Concerned tables for my application are various, > but their columns are not very complicated > to locate for a human, b

Re: table (ascii text) lin ayout recognition

2006-09-12 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hello, > > I am looking for python code useful to process > tables that are in ASCII text. The code must > determine where are the columns (fields). > Concerned tables for my application are various, > but their columns are not very complicated > to locate for a human, b

table (ascii text) lin ayout recognition

2006-09-12 Thread vbfoobar
Hello, I am looking for python code useful to process tables that are in ASCII text. The code must determine where are the columns (fields). Concerned tables for my application are various, but their columns are not very complicated to locate for a human, because even when ignoring the semantic of