plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

lexique_occurrences_retrieve.sh (331B)


      1 #!/bin/bash
      2 
      3 ZIP="Lexique383.zip"
      4 URL="http://www.lexique.org/databases/Lexique383/$ZIP"
      5 FILE="Lexique383.tsv"
      6 
      7 DIR="$( cd "$( dirname "$0" )" && pwd )"
      8 cd "$DIR"
      9 
     10 wget $URL
     11 unzip -qq $ZIP $FILE
     12 cat $FILE | sed 1d | cut -f1 |
     13   rev | cut -d' ' -f1 | rev |
     14   cat - additions_occurrences |
     15   sort | uniq -c |
     16   awk '{print $2, $1}'
     17