top_secret 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
- data/CHANGELOG.md +6 -2
- data/lib/top_secret/filters/ner.rb +2 -2
- data/lib/top_secret/version.rb +1 -1
- 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: 6ca966ae09c911bbffe556c5a4d043b5d57d344ec7169fa2fdd853b8daefe407
|
4
|
+
data.tar.gz: f2f931cbf81c0df4165b0431d6b680d8f1316454052e38d4e3bca903fab55459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77cf5529144525965ff471b2d12bd980f01e21b72714b04894e186120570e54828d1b2c08738d5c779a2e560e6f05a9642d43e4047e48c4aa3a7fe938c1bfb4
|
7
|
+
data.tar.gz: ba347a50b9cf63a88ea6f7b98e56e713330d38e5341a00a792eb180c965b23c9bf822cafa5d28aa832e9810f5da6455f6065d7af50a9257597bb5afbaf4a32ac
|
data/CHANGELOG.md
CHANGED
@@ -13,7 +13,7 @@ module TopSecret
|
|
13
13
|
def initialize(label:, tag:, min_confidence_score: nil)
|
14
14
|
@label = label
|
15
15
|
@tag = tag.upcase.to_s
|
16
|
-
@min_confidence_score = min_confidence_score
|
16
|
+
@min_confidence_score = min_confidence_score
|
17
17
|
end
|
18
18
|
|
19
19
|
# Filters and extracts entity texts matching the tag and score threshold.
|
@@ -21,7 +21,7 @@ module TopSecret
|
|
21
21
|
# @param entities [Array<Hash>] List of entity hashes with keys :tag, :score, and :text
|
22
22
|
# @return [Array<String>] Matched entity texts
|
23
23
|
def call(entities)
|
24
|
-
tags = entities.filter { _1.fetch(:tag) == tag && _1.fetch(:score) >= min_confidence_score }
|
24
|
+
tags = entities.filter { _1.fetch(:tag) == tag && _1.fetch(:score) >= (min_confidence_score || TopSecret.min_confidence_score) }
|
25
25
|
tags.map { _1.fetch(:text) }
|
26
26
|
end
|
27
27
|
|
data/lib/top_secret/version.rb
CHANGED