create-entity-server 0.0.26 → 0.0.31

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.
Files changed (98) hide show
  1. package/package.json +1 -1
  2. package/template/.env.example +26 -0
  3. package/template/configs/auth/cors.json +15 -0
  4. package/template/configs/auth/jwt.json +12 -0
  5. package/template/configs/{oauth.json → auth/oauth.json} +7 -4
  6. package/template/configs/auth/password.json +45 -0
  7. package/template/configs/{security.json → auth/security.json} +4 -2
  8. package/template/configs/cache.json +2 -1
  9. package/template/configs/keys/.gitkeep +0 -0
  10. package/template/configs/keys/apns.p8.example +7 -0
  11. package/template/configs/keys/firebase.pem.example +7 -0
  12. package/template/configs/server.json +1 -0
  13. package/template/entities/README.md +13 -16
  14. package/template/entities/System/Auth/account.json +172 -16
  15. package/template/entities/System/Auth/account_audit.json +31 -0
  16. package/template/entities/System/Auth/account_device.json +64 -0
  17. package/template/entities/System/Auth/account_login_log.json +69 -0
  18. package/template/entities/System/Auth/account_oauth.json +74 -0
  19. package/template/entities/System/Auth/api_keys.json +18 -9
  20. package/template/entities/System/Auth/identity_verification.json +106 -0
  21. package/template/entities/System/Auth/license.json +41 -20
  22. package/template/entities/System/Auth/password_history.json +19 -0
  23. package/template/entities/System/Auth/rbac_roles.json +10 -7
  24. package/template/entities/System/Backup/backup_log.json +66 -0
  25. package/template/entities/System/Email/smtp_log.json +87 -0
  26. package/template/entities/System/Email/smtp_msg.json +104 -0
  27. package/template/entities/System/Notification/alimtalk_log.json +65 -0
  28. package/template/entities/System/Notification/alimtalk_msg.json +53 -0
  29. package/template/entities/System/Notification/friendtalk_log.json +89 -0
  30. package/template/entities/System/Notification/friendtalk_msg.json +91 -0
  31. package/template/entities/System/Notification/sms_log.json +65 -0
  32. package/template/entities/System/Notification/sms_msg.json +82 -0
  33. package/template/entities/System/Notification/sms_verification.json +50 -0
  34. package/template/entities/System/Payment/pg_cancel.json +60 -0
  35. package/template/entities/System/Payment/pg_order.json +115 -0
  36. package/template/entities/System/Payment/pg_webhook_log.json +52 -0
  37. package/template/entities/System/Push/push_log.json +86 -0
  38. package/template/entities/System/Push/push_msg.json +56 -0
  39. package/template/entities/System/Storage/file_backup_log.json +51 -0
  40. package/template/entities/System/Storage/file_download_log.json +43 -0
  41. package/template/entities/System/Storage/file_meta.json +72 -0
  42. package/template/entities/System/system_audit_log.json +39 -34
  43. package/template/entities/company.json +5 -2
  44. package/template/entities/{product.json → goods.json} +9 -6
  45. package/template/entities/todo.json +4 -2
  46. package/template/samples/entities/01_basic_fields.json +15 -2
  47. package/template/samples/entities/02_types_and_defaults.json +15 -5
  48. package/template/samples/entities/03_hash_and_unique.json +18 -3
  49. package/template/samples/entities/04_fk_and_composite_unique.json +18 -3
  50. package/template/samples/entities/05_cache.json +15 -9
  51. package/template/samples/entities/06_history_and_hard_delete.json +19 -6
  52. package/template/samples/entities/07_license_scope.json +18 -3
  53. package/template/samples/entities/08_hook_sql.json +24 -5
  54. package/template/samples/entities/09_hook_entity.json +12 -2
  55. package/template/samples/entities/10_hook_submit_delete.json +14 -5
  56. package/template/samples/entities/11_hook_webhook.json +20 -6
  57. package/template/samples/entities/12_hook_push.json +15 -2
  58. package/template/samples/entities/13_read_only.json +8 -4
  59. package/template/samples/entities/14_optimistic_lock.json +13 -2
  60. package/template/samples/entities/15_reset_defaults.json +7 -1
  61. package/template/samples/entities/16_isolated_license.json +19 -6
  62. package/template/scripts/reset-all.sh +57 -3
  63. package/template/scripts/run.sh +56 -6
  64. package/template/templates/email/auth/2fa_disabled.html +23 -0
  65. package/template/templates/email/auth/2fa_recovery_regenerated.html +31 -0
  66. package/template/templates/email/auth/2fa_setup_complete.html +43 -0
  67. package/template/templates/email/auth/welcome.html +18 -0
  68. package/template/templates/email/backup/backup_completed.html +35 -0
  69. package/template/templates/email/backup/backup_failed.html +27 -0
  70. package/template/templates/email/backup/backup_partial.html +31 -0
  71. package/template/templates/email/layout.html +47 -0
  72. package/template/templates/email/order/order_confirmation.html +30 -0
  73. package/template/templates/email/storage/storage_quota_exceeded.html +37 -0
  74. package/template/templates/email/storage/storage_quota_warning.html +37 -0
  75. package/template/templates/ocr/business_reg.json +145 -0
  76. package/template/templates/ocr/career_cert.json +93 -0
  77. package/template/templates/ocr/driver_license.json +89 -0
  78. package/template/templates/ocr/facility_card.json +82 -0
  79. package/template/templates/ocr/id_card.json +55 -0
  80. package/template/templates/ocr/invoice.json +92 -0
  81. package/template/templates/ocr/namecard.json +116 -0
  82. package/template/templates/ocr/prompts/business_reg.json +14 -0
  83. package/template/templates/ocr/prompts/career_cert.json +16 -0
  84. package/template/templates/ocr/prompts/driver_license.json +14 -0
  85. package/template/templates/ocr/prompts/facility_card.json +15 -0
  86. package/template/templates/ocr/prompts/general.json +13 -0
  87. package/template/templates/ocr/prompts/id_card.json +11 -0
  88. package/template/templates/ocr/prompts/invoice.json +17 -0
  89. package/template/templates/ocr/prompts/namecard.json +15 -0
  90. package/template/templates/ocr/prompts/receipt.json +14 -0
  91. package/template/templates/ocr/receipt.json +79 -0
  92. package/template/configs/cors.json +0 -7
  93. package/template/configs/jwt.json +0 -8
  94. package/template/entities/Account/account_audit.json +0 -16
  95. /package/template/configs/{backup.json → extensions/backup.json} +0 -0
  96. /package/template/configs/{storage.json → extensions/storage.json} +0 -0
  97. /package/template/configs/{push.json → notification/push.json} +0 -0
  98. /package/template/configs/{smtp.json → notification/smtp.json} +0 -0
@@ -0,0 +1,145 @@
1
+ {
2
+ "doc_type": "business_reg",
3
+ "label": "사업자등록증",
4
+ "preprocess": {
5
+ "max_slope": 0.03,
6
+ "y_tolerance": 5,
7
+ "x_tolerance": 10,
8
+ "remove_patterns": [
9
+ "NATIONAL TAX SERVICE REPUBLIC OF KOREA",
10
+ "나라사랑e",
11
+ "nts\\.go\\.kr"
12
+ ],
13
+ "remove_keywords": [
14
+ "KOREA",
15
+ "OF",
16
+ "NATIONAL",
17
+ "REPULIC",
18
+ "국세청",
19
+ "nts.go.kr",
20
+ "TAX",
21
+ "SERVICE"
22
+ ],
23
+ "merge_patterns": ["주식회사", "(주)"]
24
+ },
25
+ "keywords": {
26
+ "dummy": ["국세청", "법인사업자", "개인사업자", "사업자등록증"],
27
+ "corp_num": ["등록번호", "사업자등록번호"],
28
+ "corp_reg_num": ["법인등록번호"],
29
+ "corp_name": ["법인명", "단체명", "상호", "법인명(단체명)"],
30
+ "ceo_name": ["대표자", "성명"],
31
+ "birthday": ["생년월일"],
32
+ "open_date": ["개업연월일"],
33
+ "address": ["사업장소재지"],
34
+ "head_address": ["본점소재지"],
35
+ "biz_type": ["업태", "사업의종류"],
36
+ "biz_class": ["종목"],
37
+ "issue_reason": ["발급사유"],
38
+ "tax_unit": ["사업자단위과세적용사업자여부"],
39
+ "email": ["전자세금계산서전용전자우편주소"]
40
+ },
41
+ "fields": {
42
+ "corp_num": {
43
+ "mode": "regex_scan",
44
+ "pattern": "([0-9]{3}-[0-9]{2}-[0-9]{5})",
45
+ "refine": "biz_num"
46
+ },
47
+ "corp_reg_num": {
48
+ "mode": "anchor",
49
+ "required_keyword": "법인등록번호",
50
+ "criteria": [
51
+ { "keyword": "법인등록번호", "direction": "RIGHT" },
52
+ { "keyword": "대표자", "direction": "DOWN" },
53
+ { "keyword": "상호", "direction": "DOWN" },
54
+ { "keyword": "사업장소재지", "direction": "UP" }
55
+ ]
56
+ },
57
+ "corp_name": {
58
+ "mode": "anchor",
59
+ "criteria": [
60
+ { "keyword": "법인명(단체명)", "direction": "RIGHT" },
61
+ { "keyword": "상호", "direction": "RIGHT" },
62
+ { "keyword": "등록번호", "direction": "DOWN" },
63
+ { "keyword": "대표자", "direction": "UP" },
64
+ { "keyword": "성명", "direction": "UP" },
65
+ { "keyword": "생년월일", "direction": "LEFT" }
66
+ ]
67
+ },
68
+ "ceo_name": {
69
+ "mode": "anchor",
70
+ "criteria": [
71
+ { "keyword": "대표자", "direction": "RIGHT" },
72
+ { "keyword": "성명", "direction": "RIGHT" },
73
+ { "keyword": "생년월일", "direction": "LEFT" },
74
+ { "keyword": "법인명(단체명)", "direction": "DOWN" },
75
+ { "keyword": "상호", "direction": "DOWN" },
76
+ { "keyword": "개업연월일", "direction": "UP" }
77
+ ]
78
+ },
79
+ "open_date": {
80
+ "mode": "anchor",
81
+ "criteria": [
82
+ { "keyword": "개업연월일", "direction": "RIGHT" },
83
+ { "keyword": "법인등록번호", "direction": "LEFT" },
84
+ { "keyword": "사업장소재지", "direction": "UP" },
85
+ { "keyword": "대표자", "direction": "DOWN" },
86
+ { "keyword": "성명", "direction": "DOWN" }
87
+ ],
88
+ "refine": "date"
89
+ },
90
+ "address": {
91
+ "mode": "anchor",
92
+ "criteria": [
93
+ { "keyword": "사업장소재지", "direction": "RIGHT" },
94
+ { "keyword": "사업장소재지", "direction": "DOWN" },
95
+ { "keyword": "본점소재지", "direction": "UP" },
96
+ { "keyword": "사업의종류", "direction": "UP" },
97
+ { "keyword": "개업연월일", "direction": "DOWN" }
98
+ ]
99
+ },
100
+ "biz_type": {
101
+ "mode": "anchor",
102
+ "criteria": [
103
+ { "keyword": "업태", "direction": "RIGHT" },
104
+ { "keyword": "종목", "direction": "LEFT" },
105
+ { "keyword": "본점소재지", "direction": "DOWN" },
106
+ { "keyword": "사업장소재지", "direction": "DOWN" },
107
+ { "keyword": "발급사유", "direction": "UP" },
108
+ { "keyword": "사업자단위과세적용사업자여부", "direction": "UP" }
109
+ ]
110
+ },
111
+ "biz_class": {
112
+ "mode": "anchor",
113
+ "criteria": [
114
+ { "keyword": "종목", "direction": "RIGHT" },
115
+ { "keyword": "본점소재지", "direction": "DOWN" },
116
+ { "keyword": "사업장소재지", "direction": "DOWN" },
117
+ { "keyword": "발급사유", "direction": "UP" },
118
+ { "keyword": "사업자단위과세적용사업자여부", "direction": "UP" }
119
+ ]
120
+ },
121
+ "email": {
122
+ "mode": "anchor",
123
+ "criteria": [
124
+ {
125
+ "keyword": "전자세금계산서전용전자우편주소",
126
+ "direction": "RIGHT"
127
+ },
128
+ {
129
+ "keyword": "전자세금계산서전용전자우편주소",
130
+ "direction": "DOWN"
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ "required_fields": ["corp_num", "corp_name"],
136
+ "confidence_weight": {
137
+ "corp_num": 0.35,
138
+ "corp_name": 0.3,
139
+ "ceo_name": 0.1,
140
+ "open_date": 0.1,
141
+ "address": 0.1,
142
+ "biz_type": 0.025,
143
+ "biz_class": 0.025
144
+ }
145
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "doc_type": "career_cert",
3
+ "label": "경력증명서 (재직증명서)",
4
+ "preprocess": {
5
+ "max_slope": 0.03,
6
+ "y_tolerance": 5,
7
+ "x_tolerance": 10
8
+ },
9
+ "keywords": {
10
+ "name": ["성명", "이름", "위\\s*사람"],
11
+ "id_number": ["주민등록번호", "생년월일"],
12
+ "company": ["회사명", "법인명", "상호", "근무처"],
13
+ "department": ["부서", "소속"],
14
+ "position": ["직위", "직급", "직책"],
15
+ "join_date": ["입사일", "입사일자", "근무시작일"],
16
+ "leave_date": ["퇴사일", "퇴사일자", "근무종료일"],
17
+ "issue_date": ["발급일", "발행일", "증명서발급일"],
18
+ "issuer": ["대표이사", "대표자", "발급기관"]
19
+ },
20
+ "fields": {
21
+ "name": {
22
+ "mode": "anchor",
23
+ "criteria": [
24
+ { "keyword": "성명", "direction": "RIGHT" },
25
+ { "keyword": "이름", "direction": "RIGHT" }
26
+ ],
27
+ "refine": "trim"
28
+ },
29
+ "id_number": {
30
+ "mode": "regex_scan",
31
+ "pattern": "([0-9]{6}-[0-9*]{7})",
32
+ "refine": "id_num"
33
+ },
34
+ "company": {
35
+ "mode": "anchor",
36
+ "criteria": [
37
+ { "keyword": "회사명", "direction": "RIGHT" },
38
+ { "keyword": "법인명", "direction": "RIGHT" },
39
+ { "keyword": "상호", "direction": "RIGHT" }
40
+ ]
41
+ },
42
+ "department": {
43
+ "mode": "anchor",
44
+ "criteria": [
45
+ { "keyword": "부서", "direction": "RIGHT" },
46
+ { "keyword": "소속", "direction": "RIGHT" }
47
+ ]
48
+ },
49
+ "position": {
50
+ "mode": "anchor",
51
+ "criteria": [
52
+ { "keyword": "직위", "direction": "RIGHT" },
53
+ { "keyword": "직급", "direction": "RIGHT" },
54
+ { "keyword": "직책", "direction": "RIGHT" }
55
+ ]
56
+ },
57
+ "join_date": {
58
+ "mode": "anchor",
59
+ "criteria": [
60
+ { "keyword": "입사일", "direction": "RIGHT" },
61
+ { "keyword": "입사일자", "direction": "RIGHT" }
62
+ ],
63
+ "refine": "date"
64
+ },
65
+ "leave_date": {
66
+ "mode": "anchor",
67
+ "criteria": [
68
+ { "keyword": "퇴사일", "direction": "RIGHT" },
69
+ { "keyword": "퇴사일자", "direction": "RIGHT" }
70
+ ],
71
+ "refine": "date"
72
+ },
73
+ "issue_date": {
74
+ "mode": "regex_scan",
75
+ "pattern": "발급일[\\s:]*([0-9]{4}[.\\-/][0-9]{1,2}[.\\-/][0-9]{1,2})",
76
+ "refine": "date"
77
+ },
78
+ "issuer": {
79
+ "mode": "regex_scan",
80
+ "pattern": "대표(?:이사)?\\s*([가-힣]{2,5})(?:\\s*[\\(印\\)\\s]|$)"
81
+ }
82
+ },
83
+ "required_fields": ["name", "company"],
84
+ "confidence_weight": {
85
+ "name": 0.2,
86
+ "company": 0.2,
87
+ "join_date": 0.2,
88
+ "leave_date": 0.15,
89
+ "position": 0.1,
90
+ "issue_date": 0.1,
91
+ "issuer": 0.05
92
+ }
93
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "doc_type": "driver_license",
3
+ "label": "운전면허증",
4
+
5
+ "preprocess": {
6
+ "max_slope": 0.03,
7
+ "y_tolerance": 4,
8
+ "x_tolerance": 8,
9
+ "remove_keywords": ["(Driver's License)", "Driver's", "License"],
10
+ "remove_patterns": ["^\\s*$", "^[가-힣]{2,4}\\s*도로교통공단$"]
11
+ },
12
+
13
+ "keywords": {
14
+ "keyword": ["자동차운전면허증", "적성검사", "기간"],
15
+ "license_type": [
16
+ "1종대형",
17
+ "1종보통",
18
+ "2종보통",
19
+ "2종소형",
20
+ "원동기",
21
+ "특수(대형견인,구난차)",
22
+ "특수(소형견인,구난차)",
23
+ "특수(건설기계)",
24
+ "특수(농기계)",
25
+ "특수(비상구난차)",
26
+ "특수(경찰용)",
27
+ "특수(소형이동기계)"
28
+ ]
29
+ },
30
+
31
+ "fields": {
32
+ "name": {
33
+ "mode": "anchor",
34
+ "criteria": [
35
+ {
36
+ "keyword": "(?:[가-힣]+\\s+)?\\d{2}-\\d{2}-\\d{6}-\\d{2}",
37
+ "direction": "DOWN_OVERLAP",
38
+ "is_regex": true
39
+ },
40
+ {
41
+ "keyword": "\\d{6}-?(\\d{7}|\\*{7})",
42
+ "direction": "UP_OVERLAP",
43
+ "is_regex": true
44
+ }
45
+ ]
46
+ },
47
+ "license_type": {
48
+ "mode": "keywords_scan",
49
+ "keywords_key": "license_type"
50
+ },
51
+ "license_num": {
52
+ "mode": "regex_scan",
53
+ "pattern": "(?:[가-힣]+\\s+)?(\\d{2}-\\d{2}-\\d{6}-\\d{2})",
54
+ "refine": "driver_license"
55
+ },
56
+ "id_number": {
57
+ "mode": "regex_scan",
58
+ "pattern": "(\\d{6}-?(\\d{7}|\\*{7}))",
59
+ "refine": "id_num"
60
+ },
61
+ "expiry_date": {
62
+ "mode": "regex_scan",
63
+ "pattern": "(\\d{4}[.\\-\\/]\\d{1,2}[.\\-\\/]\\d{1,2})\\s*~\\s*(\\d{4}[.\\-\\/]\\d{1,2}[.\\-\\/]\\d{1,2})",
64
+ "capture_group": 2,
65
+ "refine": "date"
66
+ },
67
+ "issue_date": {
68
+ "mode": "dates_scan",
69
+ "dates_index": 2,
70
+ "refine": "date"
71
+ },
72
+ "issuer": {
73
+ "mode": "regex_scan",
74
+ "pattern": "([가-힣]+지방경찰청|[가-힣]+경찰청)",
75
+ "capture_group": 1
76
+ }
77
+ },
78
+
79
+ "required_fields": ["name", "license_num"],
80
+
81
+ "confidence_weight": {
82
+ "name": 0.25,
83
+ "id_number": 0.2,
84
+ "license_num": 0.3,
85
+ "license_type": 0.1,
86
+ "issue_date": 0.1,
87
+ "expiry_date": 0.05
88
+ }
89
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "doc_type": "facility_card",
3
+ "label": "건축물대장",
4
+ "preprocess": {
5
+ "max_slope": 0.03,
6
+ "y_tolerance": 5,
7
+ "x_tolerance": 12
8
+ },
9
+ "keywords": {
10
+ "building_name": ["건물명", "건축물명", "명칭"],
11
+ "address": ["소재지", "대지위치", "주소"],
12
+ "building_use": ["주용도", "용도"],
13
+ "structure": ["구조"],
14
+ "area": ["연면적", "건축면적", "면적"],
15
+ "floor_count": ["층수", "지상", "지하"],
16
+ "approval_date": ["사용승인일", "사용승인", "준공일"],
17
+ "owner": ["소유자", "건축주"]
18
+ },
19
+ "fields": {
20
+ "building_name": {
21
+ "mode": "anchor",
22
+ "criteria": [
23
+ { "keyword": "건물명", "direction": "RIGHT" },
24
+ { "keyword": "건축물명", "direction": "RIGHT" },
25
+ { "keyword": "명칭", "direction": "RIGHT" }
26
+ ]
27
+ },
28
+ "address": {
29
+ "mode": "anchor",
30
+ "criteria": [
31
+ { "keyword": "소재지", "direction": "RIGHT" },
32
+ { "keyword": "대지위치", "direction": "RIGHT" }
33
+ ]
34
+ },
35
+ "building_use": {
36
+ "mode": "anchor",
37
+ "criteria": [
38
+ { "keyword": "주용도", "direction": "RIGHT" },
39
+ { "keyword": "용도", "direction": "RIGHT" }
40
+ ]
41
+ },
42
+ "structure": {
43
+ "mode": "anchor",
44
+ "criteria": [{ "keyword": "구조", "direction": "RIGHT" }]
45
+ },
46
+ "area": {
47
+ "mode": "anchor",
48
+ "criteria": [
49
+ { "keyword": "연면적", "direction": "RIGHT" },
50
+ { "keyword": "건축면적", "direction": "RIGHT" }
51
+ ],
52
+ "refine": "number"
53
+ },
54
+ "floor_count": {
55
+ "mode": "regex_scan",
56
+ "pattern": "지상\\s*(\\d+)층"
57
+ },
58
+ "approval_date": {
59
+ "mode": "anchor",
60
+ "criteria": [
61
+ { "keyword": "사용승인일", "direction": "RIGHT" },
62
+ { "keyword": "사용승인", "direction": "RIGHT" }
63
+ ],
64
+ "refine": "date"
65
+ },
66
+ "owner": {
67
+ "mode": "anchor",
68
+ "criteria": [
69
+ { "keyword": "소유자", "direction": "RIGHT" },
70
+ { "keyword": "건축주", "direction": "RIGHT" }
71
+ ]
72
+ }
73
+ },
74
+ "required_fields": ["address"],
75
+ "confidence_weight": {
76
+ "address": 0.3,
77
+ "building_use": 0.2,
78
+ "area": 0.2,
79
+ "approval_date": 0.15,
80
+ "owner": 0.15
81
+ }
82
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "doc_type": "id_card",
3
+ "label": "주민등록증",
4
+ "preprocess": {
5
+ "max_slope": 0.03,
6
+ "y_tolerance": 4,
7
+ "x_tolerance": 8
8
+ },
9
+ "keywords": {
10
+ "name": ["성명", "이름"],
11
+ "id_number": ["주민등록번호", "등록번호"],
12
+ "address": ["주소", "거주지"],
13
+ "issue_date": ["발급일", "발행일"]
14
+ },
15
+ "fields": {
16
+ "name": {
17
+ "mode": "anchor",
18
+ "criteria": [
19
+ { "keyword": "성명", "direction": "RIGHT" },
20
+ { "keyword": "이름", "direction": "RIGHT" }
21
+ ]
22
+ },
23
+ "id_number": {
24
+ "mode": "anchor",
25
+ "criteria": [
26
+ { "keyword": "주민등록번호", "direction": "RIGHT" },
27
+ { "keyword": "등록번호", "direction": "RIGHT" }
28
+ ],
29
+ "refine": "id_num"
30
+ },
31
+ "address": {
32
+ "mode": "anchor",
33
+ "criteria": [
34
+ { "keyword": "주소", "direction": "DOWN" },
35
+ { "keyword": "주소", "direction": "RIGHT" }
36
+ ]
37
+ },
38
+ "issue_date": {
39
+ "mode": "regex_scan",
40
+ "pattern": "발급일[\\s:]*([0-9]{4}[.\\-/][0-9]{1,2}[.\\-/][0-9]{1,2})",
41
+ "refine": "date"
42
+ },
43
+ "issuer": {
44
+ "mode": "regex_scan",
45
+ "pattern": "(\\S+구청장|\\S+시장|\\S+군수|행정안전부장관|\\S+동장)"
46
+ }
47
+ },
48
+ "required_fields": ["name", "id_number"],
49
+ "confidence_weight": {
50
+ "name": 0.25,
51
+ "id_number": 0.45,
52
+ "address": 0.2,
53
+ "issue_date": 0.1
54
+ }
55
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "doc_type": "invoice",
3
+ "label": "세금계산서",
4
+
5
+ "preprocess": {
6
+ "max_slope": 0.03,
7
+ "y_tolerance": 5,
8
+ "x_tolerance": 10,
9
+ "remove_patterns": ["^\\s*$"]
10
+ },
11
+
12
+ "keywords": {
13
+ "invoice_num": ["일련번호", "승인번호"],
14
+ "issuer_corp_num": ["공급자", "등록번호"],
15
+ "issuer_name": ["공급자", "상호"],
16
+ "receiver_corp_num": ["공급받는자", "등록번호"],
17
+ "receiver_name": ["공급받는자", "상호"],
18
+ "write_date": ["작성일자", "작성 연월일"],
19
+ "amount_total": ["공급가액", "합계금액"],
20
+ "tax_total": ["세액"],
21
+ "total_amount": ["합계금액", "총합계"]
22
+ },
23
+
24
+ "fields": {
25
+ "invoice_num": {
26
+ "output_key": "invoice_num",
27
+ "mode": "regex_scan",
28
+ "pattern": "([0-9]{8}-[0-9]{8})",
29
+ "capture_group": 1
30
+ },
31
+ "write_date": {
32
+ "output_key": "write_date",
33
+ "criteria": [
34
+ { "keyword": "작성일자", "direction": "RIGHT" },
35
+ { "keyword": "작성 연월일", "direction": "RIGHT" }
36
+ ],
37
+ "refine": "date"
38
+ },
39
+ "amount_total": {
40
+ "output_key": "amount_total",
41
+ "criteria": [
42
+ { "keyword": "공급가액", "direction": "RIGHT" },
43
+ { "keyword": "공급가액", "direction": "DOWN" }
44
+ ],
45
+ "refine": "number"
46
+ },
47
+ "tax_total": {
48
+ "output_key": "tax_total",
49
+ "criteria": [
50
+ { "keyword": "세액", "direction": "RIGHT" },
51
+ { "keyword": "세액", "direction": "DOWN" }
52
+ ],
53
+ "refine": "number"
54
+ },
55
+ "total_amount": {
56
+ "output_key": "total_amount",
57
+ "criteria": [
58
+ { "keyword": "합계금액", "direction": "RIGHT" },
59
+ { "keyword": "합계금액", "direction": "DOWN" }
60
+ ],
61
+ "refine": "number"
62
+ },
63
+ "issuer_name": {
64
+ "output_key": "issuer_name",
65
+ "region": {
66
+ "from": "공급자",
67
+ "to": "공급받는자",
68
+ "direction": "DOWN",
69
+ "x_min_anchor": "상호"
70
+ }
71
+ },
72
+ "receiver_name": {
73
+ "output_key": "receiver_name",
74
+ "region": {
75
+ "from": "공급받는자",
76
+ "to": "작성일자",
77
+ "direction": "DOWN",
78
+ "x_min_anchor": "상호"
79
+ }
80
+ }
81
+ },
82
+
83
+ "required_fields": ["total_amount"],
84
+
85
+ "confidence_weight": {
86
+ "invoice_num": 0.15,
87
+ "write_date": 0.15,
88
+ "amount_total": 0.25,
89
+ "tax_total": 0.2,
90
+ "total_amount": 0.25
91
+ }
92
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "doc_type": "namecard",
3
+ "label": "명함",
4
+ "preprocess": {
5
+ "max_slope": 0.05,
6
+ "y_tolerance": 5,
7
+ "x_tolerance": 10
8
+ },
9
+ "keywords": {
10
+ "name": ["성명", "이름"],
11
+ "company": ["주식회사", "(주)", "㈜", "Inc.", "Corp.", "Co.,", "Ltd."],
12
+ "department": ["부서", "팀", "사업부", "본부", "센터", "실", "TF"],
13
+ "title": [
14
+ "대표",
15
+ "이사",
16
+ "부장",
17
+ "차장",
18
+ "과장",
19
+ "팀장",
20
+ "실장",
21
+ "본부장",
22
+ "사원",
23
+ "대리",
24
+ "수석",
25
+ "책임",
26
+ "선임",
27
+ "CEO",
28
+ "CTO",
29
+ "CFO",
30
+ "COO",
31
+ "Director",
32
+ "Manager"
33
+ ],
34
+ "address": ["주소", "address", "addr."],
35
+ "phone": ["Tel", "TEL", "전화", "Mobile", "HP", "직통", "Fax", "FAX"],
36
+ "email": ["Email", "E-mail", "이메일", "e-mail"],
37
+ "website": ["www.", "http", "https"]
38
+ },
39
+ "fields": {
40
+ "name": {
41
+ "mode": "anchor",
42
+ "criteria": [
43
+ { "keyword": "성명", "direction": "RIGHT" },
44
+ { "keyword": "이름", "direction": "RIGHT" }
45
+ ]
46
+ },
47
+ "company": {
48
+ "mode": "anchor",
49
+ "criteria": [
50
+ { "keyword": "주식회사", "direction": "RIGHT" },
51
+ { "keyword": "주식회사", "direction": "LEFT" },
52
+ { "keyword": "(주)", "direction": "RIGHT" },
53
+ { "keyword": "㈜", "direction": "RIGHT" }
54
+ ]
55
+ },
56
+ "department": {
57
+ "mode": "anchor",
58
+ "criteria": [
59
+ { "keyword": "부서", "direction": "RIGHT" },
60
+ { "keyword": "팀", "direction": "LEFT" },
61
+ { "keyword": "사업부", "direction": "LEFT" },
62
+ { "keyword": "본부", "direction": "LEFT" },
63
+ { "keyword": "센터", "direction": "LEFT" }
64
+ ]
65
+ },
66
+ "title": {
67
+ "mode": "anchor",
68
+ "criteria": [
69
+ { "keyword": "대표이사", "direction": "LEFT" },
70
+ { "keyword": "대표이사", "direction": "RIGHT" },
71
+ { "keyword": "이사", "direction": "LEFT" },
72
+ { "keyword": "부장", "direction": "LEFT" },
73
+ { "keyword": "차장", "direction": "LEFT" },
74
+ { "keyword": "과장", "direction": "LEFT" },
75
+ { "keyword": "팀장", "direction": "LEFT" },
76
+ { "keyword": "본부장", "direction": "LEFT" },
77
+ { "keyword": "실장", "direction": "LEFT" },
78
+ { "keyword": "수석", "direction": "LEFT" },
79
+ { "keyword": "Director", "direction": "LEFT" },
80
+ { "keyword": "Manager", "direction": "LEFT" },
81
+ { "keyword": "CEO", "direction": "LEFT" }
82
+ ]
83
+ },
84
+ "phone": {
85
+ "mode": "regex_scan",
86
+ "pattern": "(?:Tel|TEL|전화|Mobile|HP|직통)[\\s.:]*([0-9][0-9\\-\\s]+[0-9])",
87
+ "multi": true,
88
+ "refine": "phone"
89
+ },
90
+ "email": {
91
+ "mode": "regex_scan",
92
+ "pattern": "[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}",
93
+ "multi": true
94
+ },
95
+ "address": {
96
+ "mode": "anchor",
97
+ "criteria": [
98
+ { "keyword": "주소", "direction": "RIGHT" },
99
+ { "keyword": "주소", "direction": "DOWN" },
100
+ { "keyword": "address", "direction": "RIGHT" }
101
+ ]
102
+ },
103
+ "website": {
104
+ "mode": "regex_scan",
105
+ "pattern": "(?:https?://|www\\.)[a-zA-Z0-9.\\-/]+"
106
+ }
107
+ },
108
+ "required_fields": [],
109
+ "confidence_weight": {
110
+ "name": 0.3,
111
+ "company": 0.3,
112
+ "phone": 0.2,
113
+ "email": 0.1,
114
+ "title": 0.1
115
+ }
116
+ }