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 (313B)


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