@whiteslove/parsing-lexicon 0.3.1 → 0.3.2
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whiteslove/parsing-lexicon",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Shared deterministic multilingual parsing lexicon for Whiteslove housing and hiring services",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,15 +10,27 @@
|
|
|
10
10
|
"main": "./src/index.js",
|
|
11
11
|
"types": "./index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
|
-
".": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"import": "./src/index.js"
|
|
16
|
+
},
|
|
14
17
|
"./lexicon-core": "./src/lexicon-core.js",
|
|
15
18
|
"./normalization": "./src/normalization.js",
|
|
16
19
|
"./countries": "./src/countries.js",
|
|
17
|
-
"./country-context": {
|
|
20
|
+
"./country-context": {
|
|
21
|
+
"types": "./src/country-context.d.ts",
|
|
22
|
+
"import": "./src/country-context.js"
|
|
23
|
+
},
|
|
18
24
|
"./geo": "./src/geo.js",
|
|
19
25
|
"./geography": "./src/geography.js",
|
|
20
|
-
"./geography-display": {
|
|
21
|
-
|
|
26
|
+
"./geography-display": {
|
|
27
|
+
"types": "./src/geography-display.d.ts",
|
|
28
|
+
"import": "./src/geography-display.js"
|
|
29
|
+
},
|
|
30
|
+
"./geography-detection": {
|
|
31
|
+
"types": "./src/geography-detection.d.ts",
|
|
32
|
+
"import": "./src/geography-detection.js"
|
|
33
|
+
},
|
|
22
34
|
"./central-asia": "./src/central-asia.js",
|
|
23
35
|
"./ukraine": "./src/ukraine.js",
|
|
24
36
|
"./location-merge": "./src/location-merge.js",
|
|
@@ -33,54 +45,170 @@
|
|
|
33
45
|
"./tashkent-colloquial": "./src/tashkent-colloquial.js",
|
|
34
46
|
"./tashkent-residential-complexes": "./src/tashkent-residential-complexes.js",
|
|
35
47
|
"./tashkent-pois": "./src/tashkent-pois.js",
|
|
36
|
-
"./tashkent-housing-geography": {
|
|
48
|
+
"./tashkent-housing-geography": {
|
|
49
|
+
"types": "./src/tashkent-housing-geography.d.ts",
|
|
50
|
+
"import": "./src/tashkent-housing-geography.js"
|
|
51
|
+
},
|
|
37
52
|
"./odesa-metropolitan": "./src/odesa-metropolitan.js",
|
|
38
53
|
"./housing": "./src/housing.js",
|
|
39
|
-
"./housing-intent": {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"./housing-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"./housing-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
"./housing-intent": {
|
|
55
|
+
"types": "./src/housing-intent.d.ts",
|
|
56
|
+
"import": "./src/housing-intent.js"
|
|
57
|
+
},
|
|
58
|
+
"./housing-commercial": {
|
|
59
|
+
"types": "./src/housing-commercial.d.ts",
|
|
60
|
+
"import": "./src/housing-commercial.js"
|
|
61
|
+
},
|
|
62
|
+
"./housing-context": {
|
|
63
|
+
"types": "./src/housing-context.d.ts",
|
|
64
|
+
"import": "./src/housing-context.js"
|
|
65
|
+
},
|
|
66
|
+
"./housing-address": {
|
|
67
|
+
"types": "./src/housing-address.d.ts",
|
|
68
|
+
"import": "./src/housing-address.js"
|
|
69
|
+
},
|
|
70
|
+
"./housing-structured": {
|
|
71
|
+
"types": "./src/housing-structured.d.ts",
|
|
72
|
+
"import": "./src/housing-structured.js"
|
|
73
|
+
},
|
|
74
|
+
"./housing-safety": {
|
|
75
|
+
"types": "./src/housing-safety.d.ts",
|
|
76
|
+
"import": "./src/housing-safety.js"
|
|
77
|
+
},
|
|
78
|
+
"./housing-title": {
|
|
79
|
+
"types": "./src/housing-title.d.ts",
|
|
80
|
+
"import": "./src/housing-title.js"
|
|
81
|
+
},
|
|
82
|
+
"./housing-language": {
|
|
83
|
+
"types": "./src/housing-language.d.ts",
|
|
84
|
+
"import": "./src/housing-language.js"
|
|
85
|
+
},
|
|
86
|
+
"./housing-features": {
|
|
87
|
+
"types": "./src/housing-features.d.ts",
|
|
88
|
+
"import": "./src/housing-features.js"
|
|
89
|
+
},
|
|
90
|
+
"./housing-listing-fields": {
|
|
91
|
+
"types": "./src/housing-listing-fields.d.ts",
|
|
92
|
+
"import": "./src/housing-listing-fields.js"
|
|
93
|
+
},
|
|
94
|
+
"./housing-text": {
|
|
95
|
+
"types": "./src/housing-text.d.ts",
|
|
96
|
+
"import": "./src/housing-text.js"
|
|
97
|
+
},
|
|
98
|
+
"./housing-source-aliases": {
|
|
99
|
+
"types": "./src/housing-source-aliases.d.ts",
|
|
100
|
+
"import": "./src/housing-source-aliases.js"
|
|
101
|
+
},
|
|
51
102
|
"./housing-poi-extensions": "./src/housing-poi-extensions.js",
|
|
52
|
-
"./housing-display": {
|
|
53
|
-
|
|
103
|
+
"./housing-display": {
|
|
104
|
+
"types": "./src/housing-display.d.ts",
|
|
105
|
+
"import": "./src/housing-display.js"
|
|
106
|
+
},
|
|
107
|
+
"./housing-listing-enrichment": {
|
|
108
|
+
"types": "./src/housing-listing-enrichment.d.ts",
|
|
109
|
+
"import": "./src/housing-listing-enrichment.js"
|
|
110
|
+
},
|
|
54
111
|
"./hiring": "./src/hiring.js",
|
|
55
112
|
"./hiring-languages": "./src/hiring-languages.js",
|
|
56
|
-
"./hiring-language-extensions": {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"./hiring-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"./hiring-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
113
|
+
"./hiring-language-extensions": {
|
|
114
|
+
"types": "./src/hiring-language-extensions.d.ts",
|
|
115
|
+
"import": "./src/hiring-language-extensions.js"
|
|
116
|
+
},
|
|
117
|
+
"./hiring-context": {
|
|
118
|
+
"types": "./src/hiring-context.d.ts",
|
|
119
|
+
"import": "./src/hiring-context.js"
|
|
120
|
+
},
|
|
121
|
+
"./hiring-source-aliases": {
|
|
122
|
+
"types": "./src/hiring-source-aliases.d.ts",
|
|
123
|
+
"import": "./src/hiring-source-aliases.js"
|
|
124
|
+
},
|
|
125
|
+
"./hiring-source-semantics": {
|
|
126
|
+
"types": "./src/hiring-source-semantics.d.ts",
|
|
127
|
+
"import": "./src/hiring-source-semantics.js"
|
|
128
|
+
},
|
|
129
|
+
"./hiring-requirements": {
|
|
130
|
+
"types": "./src/hiring-requirements.d.ts",
|
|
131
|
+
"import": "./src/hiring-requirements.js"
|
|
132
|
+
},
|
|
133
|
+
"./hiring-semantics": {
|
|
134
|
+
"types": "./src/hiring-semantics.d.ts",
|
|
135
|
+
"import": "./src/hiring-semantics.js"
|
|
136
|
+
},
|
|
137
|
+
"./hiring-work-semantics": {
|
|
138
|
+
"types": "./src/hiring-work-semantics.d.ts",
|
|
139
|
+
"import": "./src/hiring-work-semantics.js"
|
|
140
|
+
},
|
|
141
|
+
"./hiring-candidate-fields": {
|
|
142
|
+
"types": "./src/hiring-candidate-fields.d.ts",
|
|
143
|
+
"import": "./src/hiring-candidate-fields.js"
|
|
144
|
+
},
|
|
145
|
+
"./hiring-temporal": {
|
|
146
|
+
"types": "./src/hiring-temporal.d.ts",
|
|
147
|
+
"import": "./src/hiring-temporal.js"
|
|
148
|
+
},
|
|
149
|
+
"./hiring-vacancy-fields": {
|
|
150
|
+
"types": "./src/hiring-vacancy-fields.d.ts",
|
|
151
|
+
"import": "./src/hiring-vacancy-fields.js"
|
|
152
|
+
},
|
|
153
|
+
"./hiring-location-fields": {
|
|
154
|
+
"types": "./src/hiring-location-fields.d.ts",
|
|
155
|
+
"import": "./src/hiring-location-fields.js"
|
|
156
|
+
},
|
|
157
|
+
"./hiring-salary-context": {
|
|
158
|
+
"types": "./src/hiring-salary-context.d.ts",
|
|
159
|
+
"import": "./src/hiring-salary-context.js"
|
|
160
|
+
},
|
|
68
161
|
"./money": "./src/money.js",
|
|
69
|
-
"./currency": {
|
|
70
|
-
|
|
71
|
-
|
|
162
|
+
"./currency": {
|
|
163
|
+
"types": "./src/currency.d.ts",
|
|
164
|
+
"import": "./src/currency.js"
|
|
165
|
+
},
|
|
166
|
+
"./contact": {
|
|
167
|
+
"types": "./src/contact.d.ts",
|
|
168
|
+
"import": "./src/contact.js"
|
|
169
|
+
},
|
|
170
|
+
"./housing-money": {
|
|
171
|
+
"types": "./src/housing-money.d.ts",
|
|
172
|
+
"import": "./src/housing-money.js"
|
|
173
|
+
},
|
|
72
174
|
"./hiring-professions": "./src/hiring-professions.js",
|
|
73
|
-
"./hiring-skills": {
|
|
175
|
+
"./hiring-skills": {
|
|
176
|
+
"types": "./src/hiring-skills.d.ts",
|
|
177
|
+
"import": "./src/hiring-skills.js"
|
|
178
|
+
},
|
|
74
179
|
"./hiring-advanced": "./src/hiring-advanced.js"
|
|
75
180
|
},
|
|
76
|
-
"files": [
|
|
181
|
+
"files": [
|
|
182
|
+
"src",
|
|
183
|
+
"index.d.ts",
|
|
184
|
+
"README.md"
|
|
185
|
+
],
|
|
77
186
|
"sideEffects": false,
|
|
78
|
-
"engines": {
|
|
79
|
-
|
|
80
|
-
|
|
187
|
+
"engines": {
|
|
188
|
+
"node": ">=20"
|
|
189
|
+
},
|
|
190
|
+
"scripts": {
|
|
191
|
+
"test": "node --test"
|
|
192
|
+
},
|
|
193
|
+
"publishConfig": {
|
|
194
|
+
"access": "public"
|
|
195
|
+
},
|
|
81
196
|
"dependencies": {
|
|
82
197
|
"libphonenumber-js": "^1.11.20"
|
|
83
198
|
},
|
|
84
|
-
"keywords": [
|
|
199
|
+
"keywords": [
|
|
200
|
+
"parsing",
|
|
201
|
+
"lexicon",
|
|
202
|
+
"uzbek",
|
|
203
|
+
"kazakh",
|
|
204
|
+
"ukrainian",
|
|
205
|
+
"romanian",
|
|
206
|
+
"russian",
|
|
207
|
+
"housing",
|
|
208
|
+
"hiring",
|
|
209
|
+
"salary",
|
|
210
|
+
"professions",
|
|
211
|
+
"geography"
|
|
212
|
+
],
|
|
85
213
|
"license": "MIT"
|
|
86
214
|
}
|
|
@@ -3,6 +3,7 @@ export type CandidateContacts = Readonly<{ phone?: string; email?: string; teleg
|
|
|
3
3
|
|
|
4
4
|
export function extractCandidateGender(value: unknown): CandidateGender | undefined;
|
|
5
5
|
export function extractCandidateName(value: unknown): string;
|
|
6
|
+
export function isCandidateNameHidden(value: unknown): boolean;
|
|
6
7
|
export function extractCandidateAge(value: unknown, now?: Date): number | null;
|
|
7
8
|
export function parseCandidateExperienceValue(value: unknown): number | null;
|
|
8
9
|
export function extractCandidateExperienceYears(value: unknown): number | null;
|
|
@@ -40,6 +40,14 @@ export function extractCandidateName(value) {
|
|
|
40
40
|
.trim().replace(/\s{2,}/g, ' ').slice(0, 100);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
const HIDDEN_NAME_RE = /^(?:[??��]{2,}|(?:фио|ф\.и\.о\.?|піб|имя|ім['’ʼ]я|name|full name)?\s*(?:скрыт\p{L}*|прихован\p{L}*|hidden|yashiril\p{L}*|ascuns)|не\s+указан\p{L}*|not\s+specified|anonymous|аноним\p{L}*|onlayn|online|resume|резюме)$/iu;
|
|
44
|
+
|
|
45
|
+
/** Detects a source board's "name hidden"/anonymous placeholder value. */
|
|
46
|
+
export function isCandidateNameHidden(value) {
|
|
47
|
+
const text = String(value ?? '').trim();
|
|
48
|
+
return text ? HIDDEN_NAME_RE.test(text) : false;
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
export function extractCandidateAge(value, now = new Date()) {
|
|
44
52
|
const text = String(value || '');
|
|
45
53
|
const patterns = [
|