-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (121 loc) · 4.34 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (121 loc) · 4.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ko-pii"
version = "1.15.2"
description = "한국어 PII 검출 + 가역 가명화 라이브러리 (ML 없이 룰 기반)"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ name = "modak000", email = "rlaehrud63@gmail.com" },
]
maintainers = [
{ name = "modak000", email = "rlaehrud63@gmail.com" },
]
keywords = [
"pii", "privacy", "korean", "anonymization", "pseudonymization",
"government", "pipa", "kpipa", "hwp", "hwpx", "public-sector",
"비식별", "가명화", "개인정보", "공공", "한국어",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Legal Industry",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Natural Language :: Korean",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Linguistic",
"Typing :: Typed",
]
dependencies = []
[project.optional-dependencies]
# 개발
dev = ["pytest>=7.0", "pytest-cov>=4.0"]
# 입력 포맷 — HWP 5.x, PDF
file = ["olefile>=0.46", "pdfplumber>=0.10", "pypdf>=3.0"]
# Vault 암호화 — AES-GCM
security = ["cryptography>=41.0"]
# 외부 ML 모델 통합 (OpenAI Privacy Filter 등) — *optional*, 코어는 ML 없이 동작
ml = ["transformers>=4.40", "torch>=2.0"]
# Microsoft Presidio plugin
presidio = ["presidio-analyzer>=2.2", "presidio-anonymizer>=2.2"]
# MCP (Model Context Protocol) 서버
mcp = ["mcp>=1.0"]
# RAG 연동 — 검색 노드/문서 PII 마스킹 (core 패키지만, 경량)
llamaindex = ["llama-index-core>=0.10"]
langchain = ["langchain-core>=0.1"]
# 룰+ML 하이브리드 분류기 (opt-in) — *코어는 ML 없이 동작*, 본 extra 설치 시에만 활성화.
# 모델 가중치는 미배포 (학습 데이터 라이선스) — `python -m ko_pii.classifier.train` 으로 직접 학습.
classifier = ["torch>=2.0", "transformers>=4.40", "scikit-learn>=1.0", "datasets>=2.0"]
# 모든 옵션 통합
all = [
"olefile>=0.46", "pdfplumber>=0.10", "pypdf>=3.0",
"cryptography>=41.0",
"transformers>=4.40", "torch>=2.0",
"presidio-analyzer>=2.2", "presidio-anonymizer>=2.2",
"mcp>=1.0",
"llama-index-core>=0.10", "langchain-core>=0.1",
"scikit-learn>=1.0",
]
[project.urls]
Homepage = "https://github.com/Marker-Inc-Korea/ko-pii"
Repository = "https://github.com/Marker-Inc-Korea/ko-pii"
Issues = "https://github.com/Marker-Inc-Korea/ko-pii/issues"
Documentation = "https://github.com/Marker-Inc-Korea/ko-pii/tree/main/docs"
Changelog = "https://github.com/Marker-Inc-Korea/ko-pii/blob/main/CHANGELOG.md"
[project.scripts]
ko-pii = "ko_pii.cli:main"
ko-pii-benchmark = "ko_pii.eval.benchmark:main"
ko-pii-klue-bench = "ko_pii.eval.klue_benchmark:main"
ko-pii-mcp-server = "ko_pii.integrations.mcp_server:main"
ko-pii-classify = "ko_pii.classifier.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/ko_pii"]
[tool.hatch.build.targets.sdist]
include = [
"src/ko_pii",
"tests",
"docs",
"README.md",
"LICENSE",
"CHANGELOG.md",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = "-ra"
[tool.mypy]
python_version = "3.10"
strict = true
files = ["src/ko_pii"]
# optional 의존성(ML/RAG/보안/외부 도구)은 미설치 환경에서도 타입체크가 통과해야.
[[tool.mypy.overrides]]
module = [
"torch.*", "transformers.*", "tokenizers.*", "sklearn.*", "onnxruntime.*",
"huggingface_hub.*", "datasets.*", "presidio_analyzer.*",
"llama_index.*", "langchain_core.*", "cryptography.*",
]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src/ko_pii"]
omit = ["*/integrations/openai_privacy_filter.py", "*/integrations/mcp_server.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.setuptools.package-data]
ko_pii = ["py.typed"]