confidential_info_redactor_lite 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22ce6189b4e4889ade8350442036d46a8e3c4be9
4
- data.tar.gz: d636d8803c0f10de0afbd35c8a560a9cb81cc454
3
+ metadata.gz: 5944b7a68fd13e6993315805c0cfdccb59e4fd9d
4
+ data.tar.gz: bb7a44c64076277287649e006002b7cf396e2043
5
5
  SHA512:
6
- metadata.gz: 851e356e7cd32ac7c43d1070532ee596e70df2bd19433e794297ce7f94f4ee32895791b2719cbff3063b437c778c24784215ce6b7ef7577a93b9b47f56035019
7
- data.tar.gz: 4500d3135dd6bd2fcdf9eece3eba5b89035fb644879c268515469865b843c9ba0756be2e797a5070387b70657ed414c173b22456543ccea0c02125c4e53db501
6
+ metadata.gz: 0d060ed3456c2c8eaeebf8b486d70a9a15d4f35e9c7b8102ebf72a14ed4e3486cdfc0c40a151733fb6054e052145717806d8e391747e1a95dce425690440b8df
7
+ data.tar.gz: 7d0729c5404c6425f720ef0ba3bd7fe602b35e2e8d94df70be6c27aaf2a93f84f9afc29450ecdfea9d721a9f7b7b152063d0f09fa9e41b818031b6d0185c5cf2
@@ -18,7 +18,7 @@ module ConfidentialInfoRedactorLite
18
18
  next if initial_extracted_terms.length.eql?(segment.split(' ').length) && !in_corpus?(initial_extracted_terms)
19
19
  search_ngrams(initial_extracted_terms, extracted_terms)
20
20
  end
21
- extracted_terms.uniq.reject(&:empty?)
21
+ extracted_terms.map { |t| t.gsub(/\{\}/, '') }.uniq.reject(&:empty?)
22
22
  end
23
23
 
24
24
  private
@@ -1,3 +1,3 @@
1
1
  module ConfidentialInfoRedactorLite
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -149,6 +149,11 @@ RSpec.describe ConfidentialInfoRedactorLite::Extractor do
149
149
  text = 'John and Jane Doe'
150
150
  expect(described_class.new(corpus: corpus, language: 'en').extract(text)).to eq(["John", "Jane Doe"])
151
151
  end
152
+
153
+ it 'extracts the proper nouns from a text #019' do
154
+ text = 'Westin{}'
155
+ expect(described_class.new(corpus: corpus, language: 'en').extract(text)).to eq(["Westin"])
156
+ end
152
157
  end
153
158
 
154
159
  context 'German (de)' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confidential_info_redactor_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias