xws 0.1.2 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/xws.rb +6 -3
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00bcb14b29c54b61ec1be732cfbb971232c5ff67
|
4
|
+
data.tar.gz: 6e73b9ea80521a220e032f38447273cfee0b4213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34467b0169b94dc87d67282965730992d4368f8f170f4d4088b860dd78860cf9b32353c0213554f67919b96e974c51c11bb119b5471470e15f84284a3d922615
|
7
|
+
data.tar.gz: 3eb202d2b27011c3c86da01369123cbd9dc7cb58b1dead15b84a550c850f6656bba022dc12d145ed334cd48e386b9ea7182e340342cd603a3b911cc0ccf057fd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/xws.rb
CHANGED
@@ -35,9 +35,12 @@ class XWS
|
|
35
35
|
s.downcase.
|
36
36
|
gsub(/\w+'\w+/,''). # remove words containing an apostrophe
|
37
37
|
gsub(/["']/,''). # remove quotation marks
|
38
|
-
gsub(/(\w)[^a-z ]+\B|\B[^a-z #]+(\w)/,'\1\2'). # remove
|
39
|
-
|
40
|
-
gsub(/\
|
38
|
+
gsub(/(\w)[^a-z ]+\B|\B[^a-z #]+(\w)/,'\1\2'). # remove
|
39
|
+
# non-alpabetical characters from start or beginning of words
|
40
|
+
gsub(/\s.\s/,' '). # remove single digits
|
41
|
+
gsub(/\b(?:#{@ignorewords.join('|')})\b/,''). # ignore common words
|
42
|
+
gsub(/\B[^\w#]\B+/,'') # remove any other items which are
|
43
|
+
# not words or hashtags
|
41
44
|
|
42
45
|
end
|
43
46
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|