aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJ08nY2023-04-11 17:49:25 +0200
committerJ08nY2023-04-11 17:49:25 +0200
commit0da98193e18fd405e494ad3f1cf565bcd92edf81 (patch)
treedf3f5e1d258f593f89f713927d570176a64449c7 /src
parente8093d33870f96be17ca251726a295ae927d8dac (diff)
downloadsec-certs-0da98193e18fd405e494ad3f1cf565bcd92edf81.tar.gz
sec-certs-0da98193e18fd405e494ad3f1cf565bcd92edf81.tar.zst
sec-certs-0da98193e18fd405e494ad3f1cf565bcd92edf81.zip
Process cert name and entry name the same.
Diffstat (limited to 'src')
-rw-r--r--src/sec_certs/model/cc_matching.py4
-rw-r--r--src/sec_certs/model/fips_matching.py5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/sec_certs/model/cc_matching.py b/src/sec_certs/model/cc_matching.py
index d6a6d2cd..2acf4828 100644
--- a/src/sec_certs/model/cc_matching.py
+++ b/src/sec_certs/model/cc_matching.py
@@ -5,7 +5,7 @@ from typing import Mapping
from rapidfuzz import fuzz
from sec_certs.sample import CCCertificate, CertificateId
-from sec_certs.utils.strings import fully_sanitize_string, lemmatize_product_name, load_spacy_model
+from sec_certs.utils.strings import fully_sanitize_string
class CCSchemeMatcher:
@@ -24,7 +24,7 @@ class CCSchemeMatcher:
self._canonical_cert_id = CertificateId(self.scheme, cert_id).canonical
else:
self._canonical_cert_id = None
- self._product = lemmatize_product_name(load_spacy_model(), self.entry.get("product") or self.entry.get("title"))
+ self._product = fully_sanitize_string(self.entry.get("product") or self.entry.get("title"))
self._vendor = fully_sanitize_string(
self.entry.get("vendor")
or self.entry.get("developer")
diff --git a/src/sec_certs/model/fips_matching.py b/src/sec_certs/model/fips_matching.py
index d6b92061..f73067b3 100644
--- a/src/sec_certs/model/fips_matching.py
+++ b/src/sec_certs/model/fips_matching.py
@@ -7,7 +7,7 @@ from typing import Mapping, MutableMapping
from rapidfuzz import fuzz
from sec_certs.configuration import config
-from sec_certs.utils.strings import fully_sanitize_string, lemmatize_product_name, load_spacy_model
+from sec_certs.utils.strings import fully_sanitize_string
if typing.TYPE_CHECKING:
from sec_certs.dataset.fips import FIPSDataset
@@ -27,10 +27,9 @@ class FIPSProcessMatcher:
self._prepare()
def _prepare(self):
- self._product = lemmatize_product_name(load_spacy_model(), self.entry.module_name)
+ self._product = fully_sanitize_string(self.entry.module_name)
self._vendor = fully_sanitize_string(self.entry.vendor_name)
self._standard = self.entry.standard
- # self._date = getattr(self.entry, "status_since", None) or getattr(self.entry, "iut_date", None)
def match(self, cert: FIPSCertificate) -> float:
"""