Repository for computational linguistics scripts (bash, python, octave, R, etc).
Extract stretch of text from a file given the window start and end location.
Consult the script help to see the list of available parameters.
$ ./getwindow.sh -h
Usage: ./getwindow.sh [option...]
-h, --help Display this help message
-i, --input-file Specify input file name
-s, --start Specity the start position
-p, --stop Specify the end position
-t, --token Specify token (char, word, line)
A simple usage example is presented below.
$ ./getwindow.sh --input-file alice.txt --start 124 --stop 131 --token word | tr '\n' ' ' && echo ""
when suddenly a White Rabbit with pink eyes