pyannotators-patterns 0.5.88__tar.gz → 0.5.98__tar.gz
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.
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/PKG-INFO +4 -4
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/pyproject.toml +4 -2
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/setup.py +4 -6
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/src/pyannotators_patterns/__init__.py +1 -1
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/src/pyannotators_patterns/named_pattern_recognizer.py +3 -1
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/test_coords.py +5 -2
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/.bumpversion.cfg +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/.github/workflows/main.yml +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/.gitignore +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/.pre-commit-config.yaml +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/.readthedocs.yml +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/AUTHORS.md +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/CHANGELOG.md +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/Dockerfile +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/Jenkinsfile +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/LICENSE +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/README.md +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/RELEASE.md +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/bumpversion.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/.gitignore +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/CHANGELOG.md +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/LICENSE +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/_static/.gitkeep +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/_templates/.gitkeep +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/conf.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/docs/index.rst +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/mypy.ini +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/src/pyannotators_patterns/patterns.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/assertions.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/data/coords-document.json +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/data/coords.json +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/data/tel-document.json +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/data/tel.json +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/test_credit_cards.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/test_emails.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/test_tel.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/test_zip.py +0 -0
- {pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: pyannotators-patterns
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.98
|
|
4
4
|
Summary: Annotator based on Presidio pattern recognizer
|
|
5
5
|
Home-page: https://github.com/oterrier/pyannotators_patterns/
|
|
6
6
|
Keywords:
|
|
@@ -20,6 +20,8 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
20
20
|
Classifier: Development Status :: 4 - Beta
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.8
|
|
22
22
|
Requires-Dist: pymultirole-plugins>=0.5.0,<0.6.0
|
|
23
|
+
Requires-Dist: tldextract==5.1.2
|
|
24
|
+
Requires-Dist: spacy==3.4.4
|
|
23
25
|
Requires-Dist: spacy[lookups]==3.4.4
|
|
24
26
|
Requires-Dist: log-with-context
|
|
25
27
|
Requires-Dist: collections_extended
|
|
@@ -31,8 +33,6 @@ Requires-Dist: bump2version ; extra == "dev"
|
|
|
31
33
|
Requires-Dist: sphinx ; extra == "docs"
|
|
32
34
|
Requires-Dist: sphinx-rtd-theme ; extra == "docs"
|
|
33
35
|
Requires-Dist: m2r2 ; extra == "docs"
|
|
34
|
-
Requires-Dist: sphinxcontrib.apidoc ; extra == "docs"
|
|
35
|
-
Requires-Dist: jupyter_sphinx ; extra == "docs"
|
|
36
36
|
Requires-Dist: pytest ; extra == "test"
|
|
37
37
|
Requires-Dist: pytest-cov ; extra == "test"
|
|
38
38
|
Requires-Dist: pytest-flake8 ; extra == "test"
|
|
@@ -26,6 +26,8 @@ classifiers = [
|
|
|
26
26
|
]
|
|
27
27
|
requires = [
|
|
28
28
|
"pymultirole-plugins>=0.5.0,<0.6.0",
|
|
29
|
+
"tldextract==5.1.2",
|
|
30
|
+
"spacy==3.4.4",
|
|
29
31
|
"spacy[lookups]==3.4.4",
|
|
30
32
|
"log-with-context",
|
|
31
33
|
"collections_extended",
|
|
@@ -52,8 +54,8 @@ docs = [
|
|
|
52
54
|
"sphinx",
|
|
53
55
|
"sphinx-rtd-theme",
|
|
54
56
|
"m2r2", # markdown support
|
|
55
|
-
"sphinxcontrib.apidoc", # run sphinx-apidoc when building docs
|
|
56
|
-
"jupyter_sphinx", # for execution of code snippets in the documentation
|
|
57
|
+
# "sphinxcontrib.apidoc", # run sphinx-apidoc when building docs
|
|
58
|
+
# "jupyter_sphinx", # for execution of code snippets in the documentation
|
|
57
59
|
]
|
|
58
60
|
dev = [
|
|
59
61
|
"flit",
|
|
@@ -14,6 +14,8 @@ package_dir = \
|
|
|
14
14
|
|
|
15
15
|
install_requires = \
|
|
16
16
|
['pymultirole-plugins>=0.5.0,<0.6.0',
|
|
17
|
+
'tldextract==5.1.2',
|
|
18
|
+
'spacy==3.4.4',
|
|
17
19
|
'spacy[lookups]==3.4.4',
|
|
18
20
|
'log-with-context',
|
|
19
21
|
'collections_extended',
|
|
@@ -22,11 +24,7 @@ install_requires = \
|
|
|
22
24
|
|
|
23
25
|
extras_require = \
|
|
24
26
|
{'dev': ['flit', 'pre-commit', 'bump2version'],
|
|
25
|
-
'docs': ['sphinx',
|
|
26
|
-
'sphinx-rtd-theme',
|
|
27
|
-
'm2r2',
|
|
28
|
-
'sphinxcontrib.apidoc',
|
|
29
|
-
'jupyter_sphinx'],
|
|
27
|
+
'docs': ['sphinx', 'sphinx-rtd-theme', 'm2r2'],
|
|
30
28
|
'test': ['pytest',
|
|
31
29
|
'pytest-cov',
|
|
32
30
|
'pytest-flake8',
|
|
@@ -41,7 +39,7 @@ entry_points = \
|
|
|
41
39
|
'pyannotators_patterns.patterns:PatternsAnnotator']}
|
|
42
40
|
|
|
43
41
|
setup(name='pyannotators-patterns',
|
|
44
|
-
version='0.5.
|
|
42
|
+
version='0.5.98',
|
|
45
43
|
description='Annotator based on Presidio pattern recognizer',
|
|
46
44
|
author='Olivier Terrier',
|
|
47
45
|
author_email='olivier.terrier@kairntech.com',
|
{pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/src/pyannotators_patterns/__init__.py
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Annotator based on Presidio pattern recognizer"""
|
|
2
|
-
__version__ = "0.5.
|
|
2
|
+
__version__ = "0.5.98"
|
|
@@ -85,13 +85,15 @@ class NamedPatternRecognizer(PatternRecognizer):
|
|
|
85
85
|
validation_result,
|
|
86
86
|
flags,
|
|
87
87
|
)
|
|
88
|
+
recognition_metadata = {"pattern_name": pattern.name}
|
|
89
|
+
recognition_metadata.update(match.groupdict())
|
|
88
90
|
pattern_result = RecognizerResult(
|
|
89
91
|
entity_type=self.supported_entities[0],
|
|
90
92
|
start=start,
|
|
91
93
|
end=end,
|
|
92
94
|
score=score,
|
|
93
95
|
analysis_explanation=description,
|
|
94
|
-
recognition_metadata=
|
|
96
|
+
recognition_metadata=recognition_metadata
|
|
95
97
|
)
|
|
96
98
|
|
|
97
99
|
if validation_result is not None:
|
|
@@ -29,9 +29,12 @@ def test_coords(
|
|
|
29
29
|
a.text == 'N85,8598654')
|
|
30
30
|
with check:
|
|
31
31
|
assert lat0 == IsPartialDict(labelName='coords', text='N85,8598654',
|
|
32
|
-
properties=IsPartialDict(ref_lat='N', val_lat='85,8598654'
|
|
32
|
+
properties=IsPartialDict(ref_lat='N', val_lat='85,8598654',
|
|
33
|
+
pattern_name='ref_lat'))
|
|
33
34
|
|
|
34
35
|
lat1 = next(a.dict(exclude_none=True, exclude_unset=True) for a in doc0.annotations if
|
|
35
36
|
a.text == '85,8598654N')
|
|
36
37
|
with check:
|
|
37
|
-
assert lat1 == IsPartialDict(labelName='coords', text='85,8598654N',
|
|
38
|
+
assert lat1 == IsPartialDict(labelName='coords', text='85,8598654N',
|
|
39
|
+
properties=IsPartialDict(ref_lat='N', val_lat='85,8598654',
|
|
40
|
+
pattern_name='ref_lat_DEVANT'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/src/pyannotators_patterns/patterns.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyannotators_patterns-0.5.88 → pyannotators_patterns-0.5.98}/tests/data/coords-document.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|