Jsonu3.sh

A bash script wrapper, running the same perl script three times over a JSON file with lemmatizing service results. Three different types of results are extracted separately: unrecognized words (FORMA NON RECOGNITA), ambiguous lemmatizations (VERBUM AMBIGUUM) and unambiguously lemmatized forms.

Writes results to files, gives some reports.

#!/bin/bash
# Jovanovic, 2013-01
# usage: ./jsonu3.sh ime.json
# read arguments from command line, 
# reformat the JSON for processing, write JSON file
 
perl persjson-fnr.pl $1.json \
| grep 'FORMA NON RECOGNITA' > $1-fnr.csv
perl persjson-fnr.pl $1.json \
| grep 'VERBUM AMBIGUUM' > $1-ambig.csv
perl persjson-fnr.pl $1.json \
| grep -v 'FORMA NON RECOGNITA\|VERBUM AMBIGUUM' > $1-lemma.csv
wc -l $1-fnr.csv
wc -l $1-ambig.csv
wc -l $1-lemma.csv

Uses Perl script persjson-fnr.pl.

 
z/jsonu3.sh.txt · Last modified: 20. 01. 2013. 00:51 by njovanov
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki