xws 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/xws.rb +2 -2
- metadata +1 -1
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5e7e6968fbc89b86b4e4ec557441e37f3af0bb6
|
|
4
|
+
data.tar.gz: 5afac1aac6dec40e03e6f5c798d041994cc70dfd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3205cae8e76a0339f9c981a6cabf4efbf3085e33f365099fac43a171106caa992682a8d88a7cded9493789c4f305c10ef75faf1d0563e3cb562b6f2cd08b6d1a
|
|
7
|
+
data.tar.gz: d353a57171d436e53c54437ab5c07764c7e313751b4aa43a6cef9a85b764315986b4bdc5c7c93b593ff97f26bf563273d2a4229b4a2ff5855b096956026f0045
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/xws.rb
CHANGED
|
@@ -18,7 +18,7 @@ class XWS
|
|
|
18
18
|
a = []
|
|
19
19
|
|
|
20
20
|
node.each_recursive do |x|
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
if not x.name[/#{@ignore_elements.join('|')}/] then
|
|
23
23
|
a += x.texts.map(&:strip).select{|x| not x.empty?}
|
|
24
24
|
end
|
|
@@ -36,7 +36,7 @@ class XWS
|
|
|
36
36
|
gsub(/["']/,''). # remove quotation marks
|
|
37
37
|
gsub(/(\w)[^a-z ]+\B|\B[^a-z #]+(\w)/,'\1\2'). # remove non-alpabetical characters from start or beginning of words
|
|
38
38
|
gsub(/\s.\s/,' '). # remove single digits
|
|
39
|
-
gsub(/\b
|
|
39
|
+
gsub(/\b(?:#{@ignorewords.join('|')})\b/,'')
|
|
40
40
|
|
|
41
41
|
end
|
|
42
42
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
�eG($�g}XW~f�
|
|
2
|
+
�v��t����R*��u�}�.�WŰ5���1aCd�~�BPPN`��1Փ�\���K����`+I��%�g��i^j�F����~蒲
|