latvian-text / clean.sh
Raivis Dejus
Adding more cleanup
bbc85d4
raw
history blame contribute delete
426 Bytes
# Remove strings in parentheses
sed -i -e 's|([^)]*)||g' lv.txt
sed -i -e 's|{[^}]*}||g' lv.txt
sed -i -e 's|\[[^)]*\]||g' lv.txt
# Delete lines with foreign characters or junk
sed -i -e '/[óéàðæíúłßáśęινςü서주†]/d' lv.txt
sed -i -e '/{|/d' lv.txt
sed -i -e '/||/d' lv.txt
sed -i -e '/|-/d' lv.txt
sed -i -e '/!!/d' lv.txt
sed -i -e '/| /d' lv.txt
sed -i -e '/|}/d' lv.txt
sed -i -e 's|[а-я]||g' lv.txt