Does anyone have an idea how this could be accomplished?
I not that great in programming so writing a ruby or shell script do do this would take me weeks:-(
Thanks
Dino
************************
08-03-2010, 07:26 PM
John Hasler
help parsing output
Dino writes:
> Does anyone have an idea how this could be accomplished?
Perl.
> I not that great in programming so writing a ruby or shell script do
> do this would take me weeks:-(
Hire someone.
--
John Hasler
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87hbjb8plg.fsf@thumper.dhh.gt.org">http://lists.debian.org/87hbjb8plg.fsf@thumper.dhh.gt.org
08-03-2010, 07:32 PM
Joao Ferreira gmail
help parsing output
On Tue, 2010-08-03 at 12:12 -0700, Dino Vliet wrote:
> Does anyone have an idea how this could be accomplished?
> I not that great in programming so writing a ruby or shell script do
> do this would take me weeks:-(
use perl !!!
now seriously: use perl.
don't wonder around; perl is the way you should go; use perl !
it's so easy ...
open up a console and read these 2 perl manuals
$ perldoc perlintro
$ perldoc perlrequick
jmf
>
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1280863933.4378.4.camel@debj5n.critical.pt">http://lists.debian.org/1280863933.4378.4.camel@debj5n.critical.pt
08-03-2010, 07:43 PM
Kumar Appaiah
help parsing output
On Tue, Aug 03, 2010 at 12:12:26PM -0700, Dino Vliet wrote:
> Dear debian people,
>
> Can you help me with this task I have? I have a lot of files in a subdirectory
> containing the following text:
You should use awk.
- cut -
> I need to parse this file to get in a csv file the following information:
>
> Correctly Classified Instances, Kappa statistic, Total Number of Instances,
> Precision {1}, Recall {1}, F-Measure {1},Precision {2}, Recall {2}, F-Measure
> {2},Precision {3}, Recall {3}, F-Measure {3},a,b,c,a,b,c,a,b,c
> 56.6808, 0.2443, 5324760, 0.681,0.618,0.648,0.617,0.519,0.564,
> 0.056,0.296,0.094,1784321,684983,416649,787342,119 0428,314537,49255,53877,43368
>
> Does anyone have an idea how this could be accomplished?
> I not that great in programming so writing a ruby or shell script do do this
> would take me weeks:-(
A starting in Awk for processing a single file would be:
END {
printf "%d,", CCI
printf "%d,", ICI
printf "%f", KS
…
}
You ought to read the Awk manual, and then it would be a mattle of a
couple of hours of thought at most.
HTH.
Kumar
--
"Even more amazing was the realization that God has Internet access. I
wonder if He has a full newsfeed?"
(By Matt Welsh)
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100803194333.GA9899@bluemoon.alumni.iitm.ac.in"> http://lists.debian.org/20100803194333.GA9899@bluemoon.alumni.iitm.ac.in
08-03-2010, 10:22 PM
Miles Fidelman
help parsing output
Kumar Appaiah wrote:
On Tue, Aug 03, 2010 at 12:12:26PM -0700, Dino Vliet wrote:
Dear debian people,
Can you help me with this task I have? I have a lot of files in a subdirectory
containing the following text:
You should use awk.
- cut -
You ought to read the Awk manual, and then it would be a mattle of a
couple of hours of thought at most.
you might want to start by perusing the "sed" manual - it's an even
simpler tool, though it might not be powerful enough for what you're doing
also take a look at:
http://www.smashingmagazine.com/2009/04/10/25-text-batch-processing-tools-reviewed/
not Unix, but a collection of various visual tools for processing text
in batches
looks to me like your biggest problem is that each file has several
sections, each in different formats, so it's not just a matter getting
everything into a uniform tabular structure for import into a
spreadsheet. You might want to think of this as a several step process
that either:
a. breaks each file into several files, each of a uniform format, then
process each type of file separately, or b,
c. process each file to normalize it into something that's easier to
turn into csv format
Or, as someone suggested - hire someone. This is the silly kind of task
that's really easy if your facile with regular expressions, shell
scripts, and such; but can end up taking forever to get right. Judging
from the sample data, I'm guessing your at a university, there should be
enough student hackers around who work cheap.
Miles Fidelman
--
In theory, there is no difference between theory and practice.
In<fnord> practice, there is. .... Yogi Berra
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org