confidential_info_redactor_lite 0.0.17 → 0.0.18

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: 773956f15f755ab2aaf70ad75acfdd4c0ed2d9c1
4
- data.tar.gz: 4ad0c3f4555050f33608039ff40627b31e76a848
3
+ metadata.gz: 52f6dc75062fd5b96bf6ebddda6091ece0984a5f
4
+ data.tar.gz: f1e59cf4d26237d79076474ca22ee5eaeb27ae41
5
5
  SHA512:
6
- metadata.gz: 278a320f5d5e8e835abab2e62a6924629bec0b9835a18c82cbf5fa41dc7bdf5996d70411f4a478abe6b322cbc89aafd67f699ea9e7cc58c86127f7995d149c8e
7
- data.tar.gz: 954e633068ee089384440851966fc7e6fee8e4a2fbc47ec7cf3f68b6789610d1e1a123589ed7d0a33fd82a703114a1a64b5d7555e0fcd7520f85f931a94c33c7
6
+ metadata.gz: 9295558573274c81494ad53a53f61da538cba25a8bf5b32035a0af7baa78f8e2b83b63ecd3516902fc2457acfda037e5a45bf9106a4976d8c7489554182ebb34
7
+ data.tar.gz: 3b881aef75c2df2c7507034feb57ab02deba5ba4735bf50ca00c63d83eee034fd0c92a53b80a0fdf77203a8a19434c70850847cf08b9b3adc1b9796acd0e21af
@@ -25,7 +25,7 @@ module ConfidentialInfoRedactorLite
25
25
  tracker = false if corpus.include?(token.downcase)
26
26
  end
27
27
  end
28
- extracted_terms << t.gsub(/[\?\)\(\!\\\/\"\:\;\,]/, '').gsub(/\'$/, '').gsub(/”/,'').gsub(/\.\z/, '').strip unless corpus.include?(t.downcase.gsub(/[\?\.\)\(\!\\\/\"\:\;]/, '').gsub(/”/,'').gsub(/\'$/, '').strip) || !tracker
28
+ 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'))
29
29
  end
30
30
  end
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module ConfidentialInfoRedactorLite
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -142,10 +142,15 @@ RSpec.describe ConfidentialInfoRedactorLite::Extractor do
142
142
  expect(described_class.new(text: text, corpus: corpus, language: 'de').extract).to eq(['Deutschen Bank'])
143
143
  end
144
144
 
145
- it 'extracts the proper nouns from a text #001' do
145
+ it 'extracts the proper nouns from a text #002' do
146
146
  text = 'Viele Mitarbeiter der Deutsche Bank suchen eine andere Arbeitsstelle.'
147
147
  expect(described_class.new(text: text, corpus: corpus, language: 'de').extract).to eq(['Deutsche Bank'])
148
148
  end
149
+
150
+ it 'extracts the proper nouns from a text #003' do
151
+ text = 'Viele de Mitarbeiters der Deutsche Bank suchen eine andere Arbeitsstelle.'
152
+ expect(described_class.new(text: text, corpus: corpus, language: 'de').extract).to eq(['Deutsche Bank'])
153
+ end
149
154
  end
150
155
  end
151
156
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidential_info_redactor_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
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-23 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler