Re: [Jprogramming] Compressing an array vertically

2012-10-24 Thread Raul Miller
Ok... I'd do something like this: NB. stand-ins -- please replace definitions isLabel=: 'LA' e.~ {. isFirst=: 'Attribute1' -: -.&' ' processBatch=: < processItem=: < NB. utility bitshift=: |.!.0 ((1 bitshift isFirst&>) processBatch@:(processItem/.~ [: +/\ isLabel&> );.1 ]) <;._2 d1 Note that

Re: [Jprogramming] Compressing an array vertically

2012-10-23 Thread Bill Harris
Marshall Lochbaum writes: > I'm confused about how you are handling multiple values for one of the > attributes (like Attribute 1 here). If you give more detail I can give > some hints on that. Of course, if you can do it yourself, that's even > better! Marshall, You handled multiple values as

Re: [Jprogramming] Compressing an array vertically

2012-10-23 Thread Marshall Lochbaum
I'm not sure I completely understand the format you're trying to use, but here's the first part of the algorithm, which seems to be the one you don't know how to do. The key is dyadic <;.1 , which you can look up in the dictionary. ] attributes =. (<'Location'),~ 'Attribute '&,&.> ":&.>i.4 ┌──

Re: [Jprogramming] Compressing an array vertically

2012-10-23 Thread Bill Harris
On Tue, Oct 23, 2012 at 1:52 PM, Raul Miller wrote: > You will need some way of identifying each of these types of data. > > You have said that there's nothing unique about Attribute 0 except > that it appears before Attribute 1, but this does not seem like a > complete description of the rules ab

Re: [Jprogramming] Compressing an array vertically

2012-10-23 Thread Raul Miller
You will need some way of identifying each of these types of data. You have said that there's nothing unique about Attribute 0 except that it appears before Attribute 1, but this does not seem like a complete description of the rules about how identify all of these. We can't even think about orga

[Jprogramming] Compressing an array vertically

2012-10-23 Thread Bill Harris
I get to J little enough these days so I'm a bit rusty when it comes to the interesting stuff, and I'm stuck on a particular problem. I start with a PDF report. I run it through pdftotext and then format/zulu's a2b to get a file that is mostly of the form value attribute value attribute value .