suggest-keywords 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/suggest-keywords.rb +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 822adfefd5a001e37c180e74fa874c79d7b9b62c3710ec33852affd495a9b91d
|
4
|
+
data.tar.gz: 844cf2a14df8e2421838cc6cd67cd0f6a3eec8fabb9fa0a82b56aae479967df4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b00961c834562f483bdee84597dba3717da7dd303a44c30e05a9cd3e637396164b2aa480001d86b0c62929e4b64cc32758c0194c66b8c8d556ea19e8be82c79
|
7
|
+
data.tar.gz: b499c00c565e9a1d39a1731baedbb7502ad164e818289b311787e3ceb9426e4b2919cbf4ae785f34558d5965815c64e3785fa4e4258924b07470d3281f7533f8
|
data/lib/suggest-keywords.rb
CHANGED
@@ -102,10 +102,8 @@ class SuggestKeywords
|
|
102
102
|
['work environment', @group5, /(co)?-?\s?workers?|work(-|\s)?(friend)|friend\sat\swork|manager|boss\b|shift\b|(\bhr\b)?human\s?-?resources|employe(e|r)|intern(ship)?\b/i],
|
103
103
|
]
|
104
104
|
|
105
|
-
def self.scan()
|
106
|
-
|
107
|
-
text = "Oh my god my cousin literally just killed himself. Idk what to do I'm cryin so much rn, he didn't look sad recently no one would say that he was suicidal. Idk how to deal with this loss."
|
108
|
-
key_words = []
|
105
|
+
def self.scan(text)
|
106
|
+
text = text.gsub(/[()]/, "")
|
109
107
|
string_matches = []
|
110
108
|
KEYWORDS.each do |key|
|
111
109
|
if key[2].match?(text)
|