confidential_info_redactor 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d698521a92a28fa94c1cd8f2c6317b4249a0a19d
|
4
|
+
data.tar.gz: ab825e72bb74de93b72efaac0364f4b01ba7b3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b91adab393e7137f24f9255a20b9d35cb812fbbb0513b0a3daf01944065d3659ef40864bc8013c7291d210593a60341e1dae898d6c5c97262029d7f0fefc8a5f
|
7
|
+
data.tar.gz: c554f97b0ce9fe0341ab983641bc347c415d770561acb150ce810236271c485cd0b395d8ebf8eef333372ebbb6719a703adca82cef36855022b8d565c1d196e1
|
@@ -34,7 +34,7 @@ module ConfidentialInfoRedactor
|
|
34
34
|
tracker = false if corpus.include?(token.downcase)
|
35
35
|
end
|
36
36
|
end
|
37
|
-
extracted_terms << t.gsub(/[\?\)\(\!\\\/\"\:\;\,]/, '').gsub(/\'$/, '').gsub(/”/,'').gsub(/\.\z/, '').strip unless corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip) || !tracker
|
37
|
+
extracted_terms << t.gsub(/[\?\)\(\!\\\/\"\:\;\,]/, '').gsub(/\'$/, '').gsub(/”/,'').gsub(/\.\z/, '').strip unless corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip) || !tracker || (corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[0...-2]) && t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[-2..-1].eql?('en')) || (corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[0...-2]) && t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[-2..-1].eql?('es')) || (corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[0...-2]) && t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[-2..-1].eql?('er')) || (corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[0...-1]) && t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip[-1].eql?('s'))
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -141,10 +141,15 @@ RSpec.describe ConfidentialInfoRedactor::Extractor do
|
|
141
141
|
expect(described_class.new(text: text, language: 'de').extract).to eq(['Deutschen Bank'])
|
142
142
|
end
|
143
143
|
|
144
|
-
it 'extracts the proper nouns from a text #
|
144
|
+
it 'extracts the proper nouns from a text #002' do
|
145
145
|
text = 'Viele Mitarbeiter der Deutsche Bank suchen eine andere Arbeitsstelle.'
|
146
146
|
expect(described_class.new(text: text, language: 'de').extract).to eq(['Deutsche Bank'])
|
147
147
|
end
|
148
|
+
|
149
|
+
it 'extracts the proper nouns from a text #003' do
|
150
|
+
text = 'Ich behielt diese Routine während und sogar während des Studiums an der Uni bei, und ich war damals froh, wenn ich pro Tag zwei ganze Mahlzeiten zu mir nahm.'
|
151
|
+
expect(described_class.new(text: text, language: 'de').extract).to eq([])
|
152
|
+
end
|
148
153
|
end
|
149
154
|
end
|
150
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confidential_info_redactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin S. Dias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|