Raivis Dejus commited on
Commit
bbc85d4
1 Parent(s): c9aad36

Adding more cleanup

Browse files
Files changed (2) hide show
  1. README.md +9 -0
  2. clean.sh +10 -2
README.md CHANGED
@@ -58,6 +58,15 @@ To combine all datasets run
58
  sh combine-all.sh
59
  ```
60
 
 
 
 
 
 
 
 
 
 
61
 
62
  ## Notes
63
 
 
58
  sh combine-all.sh
59
  ```
60
 
61
+ To clean out some junk run.
62
+ ```
63
+ sh clean.sh
64
+ ```
65
+
66
+ Also maybe you want to remove duplocate lines. To do so run
67
+ ```
68
+ sort lv.txt | uniq > lv-uniq.txt
69
+ ```
70
 
71
  ## Notes
72
 
clean.sh CHANGED
@@ -1,6 +1,14 @@
1
  # Remove strings in parentheses
2
  sed -i -e 's|([^)]*)||g' lv.txt
 
3
  sed -i -e 's|\[[^)]*\]||g' lv.txt
4
 
5
- # Delete lines with foreign characters
6
- sed -i -e '/[óéàðæíúłßáśęινςü]/d' lv.txt
 
 
 
 
 
 
 
 
1
  # Remove strings in parentheses
2
  sed -i -e 's|([^)]*)||g' lv.txt
3
+ sed -i -e 's|{[^}]*}||g' lv.txt
4
  sed -i -e 's|\[[^)]*\]||g' lv.txt
5
 
6
+ # Delete lines with foreign characters or junk
7
+ sed -i -e '/[óéàðæíúłßáśęινςü서주†]/d' lv.txt
8
+ sed -i -e '/{|/d' lv.txt
9
+ sed -i -e '/||/d' lv.txt
10
+ sed -i -e '/|-/d' lv.txt
11
+ sed -i -e '/!!/d' lv.txt
12
+ sed -i -e '/| /d' lv.txt
13
+ sed -i -e '/|}/d' lv.txt
14
+ sed -i -e 's|[а-я]||g' lv.txt