in reply to Parsing context free grammar tags into CSV
Are you hoping for some sort of flag to give the parser that will make it output a CSV? That doesn't seem likely.
Seems to me it should be almost trivial to just let the parser do its thing, and then count and print the number of result nodes yourself.
my %typeCounts; $typeCounts{$_->{type}}++ for (@parsedOutputTokens); print $csvFileHandle "$_, $typeCounts{$_}\n" for keys %typeCounts;
|
|---|