ontocraft-check 0.3.0__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.
- ontocraft_check-0.3.0/LICENSE +202 -0
- ontocraft_check-0.3.0/NOTICE +4 -0
- ontocraft_check-0.3.0/PKG-INFO +199 -0
- ontocraft_check-0.3.0/README.md +173 -0
- ontocraft_check-0.3.0/pyproject.toml +54 -0
- ontocraft_check-0.3.0/pyproject.toml.orig +41 -0
- ontocraft_check-0.3.0/src/ontocraft_check/__init__.py +3 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/__init__.py +0 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/logic.py +194 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/metadata.py +56 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/pitfalls.py +404 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/registry.py +185 -0
- ontocraft_check-0.3.0/src/ontocraft_check/checks/shacl.py +85 -0
- ontocraft_check-0.3.0/src/ontocraft_check/cli.py +85 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/README.md +11 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/defense.json +1829 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/maint.json +1913 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/manifest.json +87 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/maritime.json +1763 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/mfg-ai.json +1653 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/onto.json +810 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/physical-ai.json +1717 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/port.json +1707 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/semiconductor.json +1735 -0
- ontocraft_check-0.3.0/src/ontocraft_check/data/registry/smartcity.json +1733 -0
- ontocraft_check-0.3.0/src/ontocraft_check/graph.py +239 -0
- ontocraft_check-0.3.0/src/ontocraft_check/mcp_server.py +105 -0
- ontocraft_check-0.3.0/src/ontocraft_check/model.py +102 -0
- ontocraft_check-0.3.0/src/ontocraft_check/render.py +340 -0
- ontocraft_check-0.3.0/src/ontocraft_check/rules.py +125 -0
- ontocraft_check-0.3.0/src/ontocraft_check/runner.py +102 -0
- ontocraft_check-0.3.0/src/ontocraft_check/terms.py +104 -0
- ontocraft_check-0.3.0/src/ontocraft_check/tools.py +164 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ontocraft-check
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: OWL 온톨로지 검사 도구: 모델링 함정, 메타데이터, OWL 2 RL 논리, SHACL, 한국 산업 용어 등록부 대조를 한국어 보고서로 냅니다
|
|
5
|
+
Keywords: ontology,owl,shacl,rdf,linter,mcp,korean
|
|
6
|
+
Author: OntoCraft
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: NOTICE
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Natural Language :: Korean
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
|
+
Requires-Dist: rdflib>=7.6.0
|
|
16
|
+
Requires-Dist: owlrl>=7.6.2
|
|
17
|
+
Requires-Dist: pyshacl>=0.40.1
|
|
18
|
+
Requires-Dist: owlready2>=0.46 ; extra == 'hermit'
|
|
19
|
+
Requires-Dist: mcp>=2.2.0,<3 ; extra == 'mcp'
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Project-URL: Homepage, https://ontocraft.com/tools/ontocheck
|
|
22
|
+
Project-URL: Repository, https://github.com/ontocraft/ontocraft-check
|
|
23
|
+
Provides-Extra: hermit
|
|
24
|
+
Provides-Extra: mcp
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# ontocraft-check
|
|
28
|
+
|
|
29
|
+
**English summary.** ontocraft-check is an OWL ontology checker by OntoCraft. It reports modelling pitfalls (approximate re-implementations inspired by the public OOPS! pitfall catalogue), metadata and naming issues, OWL 2 RL consistency, SHACL validation, and `skos:exactMatch` candidates against a bundled snapshot of the OntoCraft Korean Industry Term Registry (CC BY 4.0). Reports are written in Korean (Markdown, HTML, JSON). It ships a command-line tool, a Python API, an MCP server for AI agents (`ontocraft-check-mcp`), and a Pyodide web worker. Files never leave your machine. Code is Apache-2.0.
|
|
30
|
+
|
|
31
|
+
OntoCraft 온톨로지 검사기(ontocraft-check)는 OWL 온톨로지를 검사해 한국어 보고서를 냅니다. 현재 버전은 0.3.0입니다. 명령행 도구, 파이썬 API, AI 에이전트용 MCP 서버, 브라우저 실행기(Pyodide)가 있습니다. 검사는 모두 이 컴퓨터 안에서 돌고, 파일을 밖으로 보내지 않습니다.
|
|
32
|
+
|
|
33
|
+
## 1. 무엇을 검사하는지
|
|
34
|
+
|
|
35
|
+
검사는 네 종류이고 서로 대신하지 않습니다. 여기에 용어 등록부 대조를 더할 수 있습니다. 항목마다 심각도(치명·중요·경미), 규칙 id, 대상 IRI, 설명, 고치는 방법을 적습니다.
|
|
36
|
+
|
|
37
|
+
| 종류 | 규칙 | 쓰는 라이브러리 |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 모델링 함정 | P04, P06, P08, P10, P11, P13, P19, P22, P32, P34, P35, P34-EXT, P35-EXT, P38, P41 | rdflib |
|
|
40
|
+
| 메타데이터·명명 | META01 버전, META02 @ko 없음, META03 @en 없음, META04 레이블 없음 | rdflib |
|
|
41
|
+
| 논리 | LOGIC01 owl:Nothing, LOGIC02 서로소 위반, LOGIC03 sameAs·differentFrom 충돌, LOGIC04 그 밖의 OWL 2 RL 모순, LOGIC05 HermiT(선택) | owlrl, 선택 owlready2 |
|
|
42
|
+
| 데이터 제약 | SHACL 형상 위반. 심각도는 형상의 sh:resultSeverity를 따릅니다 | pyshacl |
|
|
43
|
+
| 용어 등록부 대조(선택) | REG01 skos:exactMatch 후보, REG02 다른 분야에서 같은 이름이 있음 | 표준 라이브러리 |
|
|
44
|
+
|
|
45
|
+
- 모델링 함정과 메타데이터는 온톨로지 파일만 봅니다. 데이터 파일은 논리와 SHACL에만 씁니다.
|
|
46
|
+
- 용어 등록부 대조는 클래스·속성의 @ko 레이블(없으면 로컬 이름)이 등록부 용어의 표제어나 동의어와 표기가 같을 때 후보를 냅니다. 표제어와 같으면 일치 신뢰도 높음, 동의어로만 맞으면 낮음입니다. 심각도가 없는 정보 항목이라 종료 코드에 영향을 주지 않습니다.
|
|
47
|
+
- 등록부는 패키지에 넣은 사본(`--registry builtin`)이나 같은 형식의 폴더를 씁니다. 기본값은 대조하지 않는 것입니다.
|
|
48
|
+
|
|
49
|
+
규칙의 세부 정의는 MCP 도구 `explain_rule`이나 소스의 `src/ontocraft_check/rules.py`에 있습니다.
|
|
50
|
+
|
|
51
|
+
## 2. 설치
|
|
52
|
+
|
|
53
|
+
파이썬 3.11 이상이 필요합니다.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install ontocraft-check # 명령행과 파이썬 API
|
|
57
|
+
pip install "ontocraft-check[mcp]" # MCP 서버까지
|
|
58
|
+
uv tool install "ontocraft-check[mcp]" # uv로 명령만 설치
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
PyPI에 올리기 전에는 저장소에서 설치합니다.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install "ontocraft-check[mcp] @ git+https://github.com/ontocraft/ontocraft-check"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 3. 명령행
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
ontocraft-check 온톨로지.ttl
|
|
71
|
+
ontocraft-check 온톨로지.ttl --data 데이터.ttl --shapes shapes.ttl --format html --out 보고서.html
|
|
72
|
+
ontocraft-check 온톨로지.ttl --registry builtin --domains maritime,port
|
|
73
|
+
ontocraft-check 온톨로지.ttl --disable P13,P22 --fail-on important
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- 입력은 Turtle, RDF/XML(.owl, .rdf), JSON-LD, N-Triples입니다. 확장자로 형식을 추정하고, 실패하면 다른 형식을 차례로 시도합니다.
|
|
77
|
+
- `--format`은 md(기본), html, json입니다.
|
|
78
|
+
- 종료 코드는 0(기준 미만), 1(`--fail-on` 기준 이상의 항목이 있음), 2(입력 파일을 읽지 못함)입니다. `--fail-on`의 기본값은 critical입니다.
|
|
79
|
+
- `--registry builtin`은 내장 등록부와 대조합니다. 폴더 경로를 주면 그 폴더의 `<분야>.json`을 씁니다.
|
|
80
|
+
- `--domains`는 후보(REG01)로 낼 분야 id입니다. 고르지 않은 분야와만 표기가 같은 것은 REG02로 따로 냅니다.
|
|
81
|
+
- `--disable`은 끌 규칙 id입니다. 끈 규칙은 보고서 머리에 적고 요약과 종료 코드에서 뺍니다. 속성 그래프(LPG) 기반 설계처럼 역관계를 일부러 두지 않으면 P13을 끕니다.
|
|
82
|
+
- `--group-over N`은 같은 규칙의 항목이 N개를 넘으면 md·html 보고서에서 한 항목으로 묶습니다(기본 10, 0이면 묶지 않음). JSON의 `findings`는 묶지 않습니다.
|
|
83
|
+
- `--reasoner hermit`은 실행 가능한 Java와 owlready2(`pip install "ontocraft-check[hermit]"`)가 있을 때만 HermiT 만족불가 검사를 더합니다. 없으면 보고서에 건너뜀으로 적습니다.
|
|
84
|
+
|
|
85
|
+
## 4. 파이썬
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from ontocraft_check.runner import run
|
|
89
|
+
from ontocraft_check.render import render
|
|
90
|
+
|
|
91
|
+
report = run("온톨로지.ttl", data="데이터.ttl", shapes="shapes.ttl",
|
|
92
|
+
registry_dir="builtin", domains=["maritime"], disable=["P13"])
|
|
93
|
+
print(report.summary())
|
|
94
|
+
open("보고서.md", "w", encoding="utf-8").write(render(report, "md"))
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
에이전트용 함수는 `ontocraft_check.tools`에 있습니다. `check_ontology`는 파일 경로와 본문 문자열을 모두 받고, `format="summary"`면 짧은 요약 사전을 돌려줍니다. `search_terms`와 `get_term`은 내장 등록부에서 용어를 찾습니다.
|
|
98
|
+
|
|
99
|
+
## 5. MCP 서버
|
|
100
|
+
|
|
101
|
+
`ontocraft-check-mcp`는 stdio로 도는 MCP 서버입니다. 도구는 다섯 개입니다.
|
|
102
|
+
|
|
103
|
+
| 도구 | 하는 일 |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `check_ontology` | ontology, data, shapes(파일 경로나 Turtle 등 본문), domains, disable, use_registry(기본 참), format(summary, json, markdown)을 받아 검사합니다. summary는 종류별 개수, 치명·중요 항목 상위 20개, 건너뛴 검사, 이 도구로 말할 수 없는 것을 담습니다 |
|
|
106
|
+
| `explain_rule` | 규칙의 뜻, 심각도, 고치는 법 |
|
|
107
|
+
| `list_rules` | 규칙 목록 |
|
|
108
|
+
| `search_terms` | 내장 등록부에서 한국어 표제어·동의어, 영어, id로 찾아 id, ko, en, definition, uri, domain을 돌려줍니다 |
|
|
109
|
+
| `get_term` | id로 용어 하나의 공개 필드 전부와 출처를 돌려줍니다 |
|
|
110
|
+
|
|
111
|
+
Claude Code에는 다음처럼 더합니다.
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
claude mcp add ontocraft-check -- uvx --from "ontocraft-check[mcp]" ontocraft-check-mcp
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Claude Desktop은 설정 파일(`claude_desktop_config.json`)에 다음을 넣습니다.
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"ontocraft-check": {
|
|
123
|
+
"command": "uvx",
|
|
124
|
+
"args": ["--from", "ontocraft-check[mcp]", "ontocraft-check-mcp"]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
PyPI에 올리기 전에는 `--from` 값을 `ontocraft-check[mcp] @ git+https://github.com/ontocraft/ontocraft-check`로 바꿉니다. 서버는 파일을 이 컴퓨터 밖으로 보내지 않습니다. 에이전트가 파일 경로를 주면 그 경로를 읽고, 본문을 주면 임시 파일에 써서 검사한 뒤 지웁니다.
|
|
131
|
+
|
|
132
|
+
## 6. 브라우저 실행
|
|
133
|
+
|
|
134
|
+
설치 없이 검사하려면 브라우저 실행 화면(https://ontocraft.com/tools/ontocheck)을 엽니다. 브라우저 안의 Pyodide가 이 패키지의 wheel을 돌리므로 파일이 서버로 가지 않습니다. 참고 구현은 `web/ontocraft-check-worker.js`와 `web/demo.html`입니다. worker 메시지 형식은 파일 머리의 주석에 있고, `registry`에 문자열 `"builtin"`을 주면 wheel에 든 등록부 사본과 대조합니다.
|
|
135
|
+
|
|
136
|
+
## 7. 내장 용어 등록부
|
|
137
|
+
|
|
138
|
+
`src/ontocraft_check/data/registry/`에 OntoCraft 한국 산업 용어 등록부의 공개 분야 사본을 넣었습니다. 분야와 용어 수, 스냅샷 날짜는 같은 폴더의 `manifest.json`에 있습니다.
|
|
139
|
+
|
|
140
|
+
- 라이선스는 CC BY 4.0입니다. 코드의 Apache-2.0과 다릅니다. 용어를 인용할 때 출처 「OntoCraft 한국 산업 용어 등록부」와 용어 주소를 적습니다.
|
|
141
|
+
- 용어 주소는 `https://w3id.org/ontocraft/terms/<id>`입니다.
|
|
142
|
+
- 용어마다 id, ko, en, alt, definition, category, broader, related, refs, example만 남겼습니다.
|
|
143
|
+
- 정의는 OntoCraft가 쓴 문장입니다. refs는 같은 개념을 다루는 표준의 이름이며, 정의가 표준과 같다는 뜻이 아닙니다.
|
|
144
|
+
- 사본은 개발자가 `python3 scripts/sync_registry.py <aki-space 경로>`로 다시 만듭니다. 손으로 고치지 않습니다.
|
|
145
|
+
|
|
146
|
+
## 8. 한계
|
|
147
|
+
|
|
148
|
+
- 모델링 함정(Pxx)은 OOPS! 함정 목록의 공개 설명을 참고해 다시 구현한 근사 검사입니다. OOPS!가 내는 결과와 개수가 다르기도 합니다.
|
|
149
|
+
- 논리 검사는 OWL 2 RL 규칙 수준의 일관성만 봅니다. 모순이 없다는 결과는 OWL 2 DL로도 일관하다는 뜻이 아닙니다. HermiT 경로는 Java가 있는 환경에서 실행해 확인하지 못했습니다.
|
|
150
|
+
- 의미 판단이 필요한 함정(P01 한 클래스에 여러 뜻, P05 잘못된 역관계, P31 잘못된 동치 관계 등)은 검사하지 않습니다.
|
|
151
|
+
- owl:imports를 따라가지 않습니다. 온톨로지 파일 하나만 봅니다.
|
|
152
|
+
- SHACL 검증은 형상이 표현한 조건만큼만 말합니다.
|
|
153
|
+
- 등록부 대조는 표기만 비교합니다. 후보를 넣기 전에 정의를 읽고 뜻이 같은지 사람이 확인해야 합니다. 내장 사본은 스냅샷 날짜 이후의 등록부 변경을 담지 않습니다.
|
|
154
|
+
|
|
155
|
+
## 9. OOPS! 고지
|
|
156
|
+
|
|
157
|
+
Pxx 번호는 OOPS!(OntOlogy Pitfall Scanner!) 함정 목록(https://oops.linkeddata.es/catalogue.jsp)의 번호를 따릅니다. OOPS!의 코드는 보지도 옮기지도 않았고, 공개 함정 목록의 설명 수준만 참고했습니다. 이 도구의 결과는 OOPS! 자체의 결과가 아닙니다.
|
|
158
|
+
|
|
159
|
+
## 10. 의존성과 라이선스
|
|
160
|
+
|
|
161
|
+
| 패키지 | 라이선스 | 쓰는 곳 |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| rdflib 7.6 이상 | BSD-3-Clause | 읽기, 모델링 함정, 메타데이터 |
|
|
164
|
+
| owlrl 7.6.2 이상 | W3C Software License(OSI 승인, BSD 계열 허용 라이선스) | OWL 2 RL 폐포 |
|
|
165
|
+
| pyshacl 0.40.1 이상 | Apache-2.0 | SHACL 검증 |
|
|
166
|
+
| mcp 2.2 이상 3 미만(선택) | MIT | MCP 서버 |
|
|
167
|
+
| owlready2(선택) | LGPL-3.0 | HermiT 경로. 기본 설치에 들어가지 않습니다 |
|
|
168
|
+
|
|
169
|
+
코드는 Apache-2.0입니다(Copyright 2026 OntoCraft). 전문은 `LICENSE`, 고지는 `NOTICE`에 있습니다. 내장 용어 등록부 데이터는 CC BY 4.0입니다.
|
|
170
|
+
|
|
171
|
+
## 11. 개발
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
uv sync --extra mcp
|
|
175
|
+
uv run pytest
|
|
176
|
+
uv build
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
mcp가 없으면 MCP 시험은 건너뜁니다. 환경 변수 `ONTOCRAFT_REGISTRY_DIR`에 정본 등록부 폴더를 주면 그 폴더로 대조하는 시험 하나가 더 돕니다. GitHub Actions가 파이썬 3.11과 3.12에서 시험을 돌립니다.
|
|
180
|
+
|
|
181
|
+
## 12. 변경 기록
|
|
182
|
+
|
|
183
|
+
### 0.3.0 (2026-10-09)
|
|
184
|
+
|
|
185
|
+
- 이름을 바꿨습니다. 배포 이름은 `ontocraft-check`, import 패키지는 `ontocraft_check`, 명령은 `ontocraft-check`입니다. PyPI에 다른 곳의 OntoCheck가 있어 겹치지 않게 했습니다. 보고서 머리의 도구 이름은 「OntoCraft 온톨로지 검사기(ontocraft-check)」입니다. 0.2.0 이전 이름은 `ontocheck`입니다.
|
|
186
|
+
- OntoCraft 한국 산업 용어 등록부의 공개 분야 사본을 넣고 `--registry builtin`(파이썬 `registry_dir="builtin"`)으로 대조합니다. 기본값은 지금처럼 대조하지 않는 것입니다.
|
|
187
|
+
- MCP 서버 `ontocraft-check-mcp`를 더했습니다(선택 의존성 `mcp`). 도구는 check_ontology, explain_rule, list_rules, search_terms, get_term입니다.
|
|
188
|
+
- 브라우저 실행기 파일 이름을 `web/ontocraft-check-worker.js`로 바꿨습니다. 메시지 형식은 0.2.0과 같고, 값을 준 선택지만 run()에 넘깁니다. `registry: "builtin"`을 받습니다.
|
|
189
|
+
- 검사 규칙과 결과는 0.2.0과 같습니다.
|
|
190
|
+
|
|
191
|
+
### 0.2.0 (2026-10-09)
|
|
192
|
+
|
|
193
|
+
- 등록부 대조에 분야를 구분합니다(`--domains`, REG02). 후보에 일치 신뢰도(높음·낮음)를 붙입니다.
|
|
194
|
+
- 같은 규칙의 항목이 많으면 보고서에서 묶습니다(`--group-over`).
|
|
195
|
+
- `--disable`로 규칙을 끕니다. P13 설명에 속성 그래프 기반 설계의 사정을 더했습니다.
|
|
196
|
+
|
|
197
|
+
### 0.1.0
|
|
198
|
+
|
|
199
|
+
첫 버전입니다. 모델링 함정, 메타데이터·명명, OWL 2 RL 논리, SHACL, 용어 등록부 대조를 냅니다.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# ontocraft-check
|
|
2
|
+
|
|
3
|
+
**English summary.** ontocraft-check is an OWL ontology checker by OntoCraft. It reports modelling pitfalls (approximate re-implementations inspired by the public OOPS! pitfall catalogue), metadata and naming issues, OWL 2 RL consistency, SHACL validation, and `skos:exactMatch` candidates against a bundled snapshot of the OntoCraft Korean Industry Term Registry (CC BY 4.0). Reports are written in Korean (Markdown, HTML, JSON). It ships a command-line tool, a Python API, an MCP server for AI agents (`ontocraft-check-mcp`), and a Pyodide web worker. Files never leave your machine. Code is Apache-2.0.
|
|
4
|
+
|
|
5
|
+
OntoCraft 온톨로지 검사기(ontocraft-check)는 OWL 온톨로지를 검사해 한국어 보고서를 냅니다. 현재 버전은 0.3.0입니다. 명령행 도구, 파이썬 API, AI 에이전트용 MCP 서버, 브라우저 실행기(Pyodide)가 있습니다. 검사는 모두 이 컴퓨터 안에서 돌고, 파일을 밖으로 보내지 않습니다.
|
|
6
|
+
|
|
7
|
+
## 1. 무엇을 검사하는지
|
|
8
|
+
|
|
9
|
+
검사는 네 종류이고 서로 대신하지 않습니다. 여기에 용어 등록부 대조를 더할 수 있습니다. 항목마다 심각도(치명·중요·경미), 규칙 id, 대상 IRI, 설명, 고치는 방법을 적습니다.
|
|
10
|
+
|
|
11
|
+
| 종류 | 규칙 | 쓰는 라이브러리 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 모델링 함정 | P04, P06, P08, P10, P11, P13, P19, P22, P32, P34, P35, P34-EXT, P35-EXT, P38, P41 | rdflib |
|
|
14
|
+
| 메타데이터·명명 | META01 버전, META02 @ko 없음, META03 @en 없음, META04 레이블 없음 | rdflib |
|
|
15
|
+
| 논리 | LOGIC01 owl:Nothing, LOGIC02 서로소 위반, LOGIC03 sameAs·differentFrom 충돌, LOGIC04 그 밖의 OWL 2 RL 모순, LOGIC05 HermiT(선택) | owlrl, 선택 owlready2 |
|
|
16
|
+
| 데이터 제약 | SHACL 형상 위반. 심각도는 형상의 sh:resultSeverity를 따릅니다 | pyshacl |
|
|
17
|
+
| 용어 등록부 대조(선택) | REG01 skos:exactMatch 후보, REG02 다른 분야에서 같은 이름이 있음 | 표준 라이브러리 |
|
|
18
|
+
|
|
19
|
+
- 모델링 함정과 메타데이터는 온톨로지 파일만 봅니다. 데이터 파일은 논리와 SHACL에만 씁니다.
|
|
20
|
+
- 용어 등록부 대조는 클래스·속성의 @ko 레이블(없으면 로컬 이름)이 등록부 용어의 표제어나 동의어와 표기가 같을 때 후보를 냅니다. 표제어와 같으면 일치 신뢰도 높음, 동의어로만 맞으면 낮음입니다. 심각도가 없는 정보 항목이라 종료 코드에 영향을 주지 않습니다.
|
|
21
|
+
- 등록부는 패키지에 넣은 사본(`--registry builtin`)이나 같은 형식의 폴더를 씁니다. 기본값은 대조하지 않는 것입니다.
|
|
22
|
+
|
|
23
|
+
규칙의 세부 정의는 MCP 도구 `explain_rule`이나 소스의 `src/ontocraft_check/rules.py`에 있습니다.
|
|
24
|
+
|
|
25
|
+
## 2. 설치
|
|
26
|
+
|
|
27
|
+
파이썬 3.11 이상이 필요합니다.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install ontocraft-check # 명령행과 파이썬 API
|
|
31
|
+
pip install "ontocraft-check[mcp]" # MCP 서버까지
|
|
32
|
+
uv tool install "ontocraft-check[mcp]" # uv로 명령만 설치
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
PyPI에 올리기 전에는 저장소에서 설치합니다.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install "ontocraft-check[mcp] @ git+https://github.com/ontocraft/ontocraft-check"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 3. 명령행
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ontocraft-check 온톨로지.ttl
|
|
45
|
+
ontocraft-check 온톨로지.ttl --data 데이터.ttl --shapes shapes.ttl --format html --out 보고서.html
|
|
46
|
+
ontocraft-check 온톨로지.ttl --registry builtin --domains maritime,port
|
|
47
|
+
ontocraft-check 온톨로지.ttl --disable P13,P22 --fail-on important
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- 입력은 Turtle, RDF/XML(.owl, .rdf), JSON-LD, N-Triples입니다. 확장자로 형식을 추정하고, 실패하면 다른 형식을 차례로 시도합니다.
|
|
51
|
+
- `--format`은 md(기본), html, json입니다.
|
|
52
|
+
- 종료 코드는 0(기준 미만), 1(`--fail-on` 기준 이상의 항목이 있음), 2(입력 파일을 읽지 못함)입니다. `--fail-on`의 기본값은 critical입니다.
|
|
53
|
+
- `--registry builtin`은 내장 등록부와 대조합니다. 폴더 경로를 주면 그 폴더의 `<분야>.json`을 씁니다.
|
|
54
|
+
- `--domains`는 후보(REG01)로 낼 분야 id입니다. 고르지 않은 분야와만 표기가 같은 것은 REG02로 따로 냅니다.
|
|
55
|
+
- `--disable`은 끌 규칙 id입니다. 끈 규칙은 보고서 머리에 적고 요약과 종료 코드에서 뺍니다. 속성 그래프(LPG) 기반 설계처럼 역관계를 일부러 두지 않으면 P13을 끕니다.
|
|
56
|
+
- `--group-over N`은 같은 규칙의 항목이 N개를 넘으면 md·html 보고서에서 한 항목으로 묶습니다(기본 10, 0이면 묶지 않음). JSON의 `findings`는 묶지 않습니다.
|
|
57
|
+
- `--reasoner hermit`은 실행 가능한 Java와 owlready2(`pip install "ontocraft-check[hermit]"`)가 있을 때만 HermiT 만족불가 검사를 더합니다. 없으면 보고서에 건너뜀으로 적습니다.
|
|
58
|
+
|
|
59
|
+
## 4. 파이썬
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from ontocraft_check.runner import run
|
|
63
|
+
from ontocraft_check.render import render
|
|
64
|
+
|
|
65
|
+
report = run("온톨로지.ttl", data="데이터.ttl", shapes="shapes.ttl",
|
|
66
|
+
registry_dir="builtin", domains=["maritime"], disable=["P13"])
|
|
67
|
+
print(report.summary())
|
|
68
|
+
open("보고서.md", "w", encoding="utf-8").write(render(report, "md"))
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
에이전트용 함수는 `ontocraft_check.tools`에 있습니다. `check_ontology`는 파일 경로와 본문 문자열을 모두 받고, `format="summary"`면 짧은 요약 사전을 돌려줍니다. `search_terms`와 `get_term`은 내장 등록부에서 용어를 찾습니다.
|
|
72
|
+
|
|
73
|
+
## 5. MCP 서버
|
|
74
|
+
|
|
75
|
+
`ontocraft-check-mcp`는 stdio로 도는 MCP 서버입니다. 도구는 다섯 개입니다.
|
|
76
|
+
|
|
77
|
+
| 도구 | 하는 일 |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `check_ontology` | ontology, data, shapes(파일 경로나 Turtle 등 본문), domains, disable, use_registry(기본 참), format(summary, json, markdown)을 받아 검사합니다. summary는 종류별 개수, 치명·중요 항목 상위 20개, 건너뛴 검사, 이 도구로 말할 수 없는 것을 담습니다 |
|
|
80
|
+
| `explain_rule` | 규칙의 뜻, 심각도, 고치는 법 |
|
|
81
|
+
| `list_rules` | 규칙 목록 |
|
|
82
|
+
| `search_terms` | 내장 등록부에서 한국어 표제어·동의어, 영어, id로 찾아 id, ko, en, definition, uri, domain을 돌려줍니다 |
|
|
83
|
+
| `get_term` | id로 용어 하나의 공개 필드 전부와 출처를 돌려줍니다 |
|
|
84
|
+
|
|
85
|
+
Claude Code에는 다음처럼 더합니다.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
claude mcp add ontocraft-check -- uvx --from "ontocraft-check[mcp]" ontocraft-check-mcp
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Claude Desktop은 설정 파일(`claude_desktop_config.json`)에 다음을 넣습니다.
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"ontocraft-check": {
|
|
97
|
+
"command": "uvx",
|
|
98
|
+
"args": ["--from", "ontocraft-check[mcp]", "ontocraft-check-mcp"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
PyPI에 올리기 전에는 `--from` 값을 `ontocraft-check[mcp] @ git+https://github.com/ontocraft/ontocraft-check`로 바꿉니다. 서버는 파일을 이 컴퓨터 밖으로 보내지 않습니다. 에이전트가 파일 경로를 주면 그 경로를 읽고, 본문을 주면 임시 파일에 써서 검사한 뒤 지웁니다.
|
|
105
|
+
|
|
106
|
+
## 6. 브라우저 실행
|
|
107
|
+
|
|
108
|
+
설치 없이 검사하려면 브라우저 실행 화면(https://ontocraft.com/tools/ontocheck)을 엽니다. 브라우저 안의 Pyodide가 이 패키지의 wheel을 돌리므로 파일이 서버로 가지 않습니다. 참고 구현은 `web/ontocraft-check-worker.js`와 `web/demo.html`입니다. worker 메시지 형식은 파일 머리의 주석에 있고, `registry`에 문자열 `"builtin"`을 주면 wheel에 든 등록부 사본과 대조합니다.
|
|
109
|
+
|
|
110
|
+
## 7. 내장 용어 등록부
|
|
111
|
+
|
|
112
|
+
`src/ontocraft_check/data/registry/`에 OntoCraft 한국 산업 용어 등록부의 공개 분야 사본을 넣었습니다. 분야와 용어 수, 스냅샷 날짜는 같은 폴더의 `manifest.json`에 있습니다.
|
|
113
|
+
|
|
114
|
+
- 라이선스는 CC BY 4.0입니다. 코드의 Apache-2.0과 다릅니다. 용어를 인용할 때 출처 「OntoCraft 한국 산업 용어 등록부」와 용어 주소를 적습니다.
|
|
115
|
+
- 용어 주소는 `https://w3id.org/ontocraft/terms/<id>`입니다.
|
|
116
|
+
- 용어마다 id, ko, en, alt, definition, category, broader, related, refs, example만 남겼습니다.
|
|
117
|
+
- 정의는 OntoCraft가 쓴 문장입니다. refs는 같은 개념을 다루는 표준의 이름이며, 정의가 표준과 같다는 뜻이 아닙니다.
|
|
118
|
+
- 사본은 개발자가 `python3 scripts/sync_registry.py <aki-space 경로>`로 다시 만듭니다. 손으로 고치지 않습니다.
|
|
119
|
+
|
|
120
|
+
## 8. 한계
|
|
121
|
+
|
|
122
|
+
- 모델링 함정(Pxx)은 OOPS! 함정 목록의 공개 설명을 참고해 다시 구현한 근사 검사입니다. OOPS!가 내는 결과와 개수가 다르기도 합니다.
|
|
123
|
+
- 논리 검사는 OWL 2 RL 규칙 수준의 일관성만 봅니다. 모순이 없다는 결과는 OWL 2 DL로도 일관하다는 뜻이 아닙니다. HermiT 경로는 Java가 있는 환경에서 실행해 확인하지 못했습니다.
|
|
124
|
+
- 의미 판단이 필요한 함정(P01 한 클래스에 여러 뜻, P05 잘못된 역관계, P31 잘못된 동치 관계 등)은 검사하지 않습니다.
|
|
125
|
+
- owl:imports를 따라가지 않습니다. 온톨로지 파일 하나만 봅니다.
|
|
126
|
+
- SHACL 검증은 형상이 표현한 조건만큼만 말합니다.
|
|
127
|
+
- 등록부 대조는 표기만 비교합니다. 후보를 넣기 전에 정의를 읽고 뜻이 같은지 사람이 확인해야 합니다. 내장 사본은 스냅샷 날짜 이후의 등록부 변경을 담지 않습니다.
|
|
128
|
+
|
|
129
|
+
## 9. OOPS! 고지
|
|
130
|
+
|
|
131
|
+
Pxx 번호는 OOPS!(OntOlogy Pitfall Scanner!) 함정 목록(https://oops.linkeddata.es/catalogue.jsp)의 번호를 따릅니다. OOPS!의 코드는 보지도 옮기지도 않았고, 공개 함정 목록의 설명 수준만 참고했습니다. 이 도구의 결과는 OOPS! 자체의 결과가 아닙니다.
|
|
132
|
+
|
|
133
|
+
## 10. 의존성과 라이선스
|
|
134
|
+
|
|
135
|
+
| 패키지 | 라이선스 | 쓰는 곳 |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| rdflib 7.6 이상 | BSD-3-Clause | 읽기, 모델링 함정, 메타데이터 |
|
|
138
|
+
| owlrl 7.6.2 이상 | W3C Software License(OSI 승인, BSD 계열 허용 라이선스) | OWL 2 RL 폐포 |
|
|
139
|
+
| pyshacl 0.40.1 이상 | Apache-2.0 | SHACL 검증 |
|
|
140
|
+
| mcp 2.2 이상 3 미만(선택) | MIT | MCP 서버 |
|
|
141
|
+
| owlready2(선택) | LGPL-3.0 | HermiT 경로. 기본 설치에 들어가지 않습니다 |
|
|
142
|
+
|
|
143
|
+
코드는 Apache-2.0입니다(Copyright 2026 OntoCraft). 전문은 `LICENSE`, 고지는 `NOTICE`에 있습니다. 내장 용어 등록부 데이터는 CC BY 4.0입니다.
|
|
144
|
+
|
|
145
|
+
## 11. 개발
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
uv sync --extra mcp
|
|
149
|
+
uv run pytest
|
|
150
|
+
uv build
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
mcp가 없으면 MCP 시험은 건너뜁니다. 환경 변수 `ONTOCRAFT_REGISTRY_DIR`에 정본 등록부 폴더를 주면 그 폴더로 대조하는 시험 하나가 더 돕니다. GitHub Actions가 파이썬 3.11과 3.12에서 시험을 돌립니다.
|
|
154
|
+
|
|
155
|
+
## 12. 변경 기록
|
|
156
|
+
|
|
157
|
+
### 0.3.0 (2026-10-09)
|
|
158
|
+
|
|
159
|
+
- 이름을 바꿨습니다. 배포 이름은 `ontocraft-check`, import 패키지는 `ontocraft_check`, 명령은 `ontocraft-check`입니다. PyPI에 다른 곳의 OntoCheck가 있어 겹치지 않게 했습니다. 보고서 머리의 도구 이름은 「OntoCraft 온톨로지 검사기(ontocraft-check)」입니다. 0.2.0 이전 이름은 `ontocheck`입니다.
|
|
160
|
+
- OntoCraft 한국 산업 용어 등록부의 공개 분야 사본을 넣고 `--registry builtin`(파이썬 `registry_dir="builtin"`)으로 대조합니다. 기본값은 지금처럼 대조하지 않는 것입니다.
|
|
161
|
+
- MCP 서버 `ontocraft-check-mcp`를 더했습니다(선택 의존성 `mcp`). 도구는 check_ontology, explain_rule, list_rules, search_terms, get_term입니다.
|
|
162
|
+
- 브라우저 실행기 파일 이름을 `web/ontocraft-check-worker.js`로 바꿨습니다. 메시지 형식은 0.2.0과 같고, 값을 준 선택지만 run()에 넘깁니다. `registry: "builtin"`을 받습니다.
|
|
163
|
+
- 검사 규칙과 결과는 0.2.0과 같습니다.
|
|
164
|
+
|
|
165
|
+
### 0.2.0 (2026-10-09)
|
|
166
|
+
|
|
167
|
+
- 등록부 대조에 분야를 구분합니다(`--domains`, REG02). 후보에 일치 신뢰도(높음·낮음)를 붙입니다.
|
|
168
|
+
- 같은 규칙의 항목이 많으면 보고서에서 묶습니다(`--group-over`).
|
|
169
|
+
- `--disable`로 규칙을 끕니다. P13 설명에 속성 그래프 기반 설계의 사정을 더했습니다.
|
|
170
|
+
|
|
171
|
+
### 0.1.0
|
|
172
|
+
|
|
173
|
+
첫 버전입니다. 모델링 함정, 메타데이터·명명, OWL 2 RL 논리, SHACL, 용어 등록부 대조를 냅니다.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ontocraft-check"
|
|
3
|
+
version = "0.3.0"
|
|
4
|
+
description = "OWL 온톨로지 검사 도구: 모델링 함정, 메타데이터, OWL 2 RL 논리, SHACL, 한국 산업 용어 등록부 대조를 한국어 보고서로 냅니다"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
license-files = [
|
|
8
|
+
"LICENSE",
|
|
9
|
+
"NOTICE",
|
|
10
|
+
]
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
keywords = [
|
|
13
|
+
"ontology",
|
|
14
|
+
"owl",
|
|
15
|
+
"shacl",
|
|
16
|
+
"rdf",
|
|
17
|
+
"linter",
|
|
18
|
+
"mcp",
|
|
19
|
+
"korean",
|
|
20
|
+
]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Natural Language :: Korean",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"rdflib>=7.6.0",
|
|
30
|
+
"owlrl>=7.6.2",
|
|
31
|
+
"pyshacl>=0.40.1",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[[project.authors]]
|
|
35
|
+
name = "OntoCraft"
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
mcp = ["mcp>=2.2.0,<3"]
|
|
39
|
+
hermit = ["owlready2>=0.46"]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://ontocraft.com/tools/ontocheck"
|
|
43
|
+
Repository = "https://github.com/ontocraft/ontocraft-check"
|
|
44
|
+
|
|
45
|
+
[project.scripts]
|
|
46
|
+
ontocraft-check = "ontocraft_check.cli:main"
|
|
47
|
+
ontocraft-check-mcp = "ontocraft_check.mcp_server:main"
|
|
48
|
+
|
|
49
|
+
[dependency-groups]
|
|
50
|
+
dev = ["pytest>=8"]
|
|
51
|
+
|
|
52
|
+
[build-system]
|
|
53
|
+
requires = ["uv_build>=0.8,<0.12"]
|
|
54
|
+
build-backend = "uv_build"
|