@whiteslove/parsing-lexicon 0.7.1 → 0.7.3
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 +1 -1
- package/src/geo.js +1 -1
- package/src/hiring-candidate-fields.js +7 -3
package/package.json
CHANGED
package/src/geo.js
CHANGED
|
@@ -160,7 +160,7 @@ export const TASHKENT_AREAS = Object.freeze({
|
|
|
160
160
|
]),
|
|
161
161
|
Yunusabad: Object.freeze([
|
|
162
162
|
area('Kashgar', ['кашгар', 'қашқар', 'qashqar', 'kashgar', 'ц 4', 'c 4']), area('Qiyot', ['киёт', 'кият', 'қиёт', 'qiyot', 'kiyot', 'markaz 5', 's 5']),
|
|
163
|
-
area('Minor', ['минор', 'minor', 'ц 6', 'c 6']), area('ToshGRES', ['ташгрэс', 'tashgres', 'TashGRES', 'toshgres']), area('Manzara', ['манзара', 'manzara']),
|
|
163
|
+
area('Minor', ['минор', 'minor', 'ц 6', 'c 6'], 'mahalla'), area('ToshGRES', ['ташгрэс', 'tashgres', 'TashGRES', 'toshgres']), area('Manzara', ['манзара', 'manzara']),
|
|
164
164
|
]),
|
|
165
165
|
Yakkasaray: Object.freeze([
|
|
166
166
|
area('Bashlyk', ['башлык', 'бошлиқ', 'boshliq', 'bashlyk']), area('Kushbegi', ['кушбеги', 'қушбеги', 'qushbegi', 'kushbegi']),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { findTelegramContacts, parsePhoneNumbers } from './contact.js';
|
|
2
2
|
import { countryPhoneHint } from './country-context.js';
|
|
3
3
|
|
|
4
4
|
const EXPLICIT_FEMALE_RE = /(?:^|[^\p{L}])(?:женщина|женский|девушка|female|ayol)(?=$|[^\p{L}])/iu;
|
|
@@ -91,9 +91,13 @@ export function extractCandidateExperienceYears(value) {
|
|
|
91
91
|
export function extractCandidateContacts(value, country = '') {
|
|
92
92
|
const text = String(value || '');
|
|
93
93
|
const countryHint = countryPhoneHint(country) || undefined;
|
|
94
|
+
// Candidate profiles must only publish normalized, country-aware phone
|
|
95
|
+
// evidence. A broad numeric mask is useful to protect housing money parsing,
|
|
96
|
+
// but it is deliberately permissive and can include dates or identifiers.
|
|
97
|
+
// Falling back to it here turns harmless activity timestamps into direct CV
|
|
98
|
+
// contacts and changes an otherwise platform-only profile's contact type.
|
|
94
99
|
const parsedPhone = parsePhoneNumbers(text, { countryHint, includePossible: true })[0];
|
|
95
|
-
const
|
|
96
|
-
const phone = parsedPhone?.number || broadPhone?.raw || undefined;
|
|
100
|
+
const phone = parsedPhone?.number || undefined;
|
|
97
101
|
const email = text.match(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/iu)?.[0];
|
|
98
102
|
const telegram = findTelegramContacts(text)[0]?.handle;
|
|
99
103
|
return Object.freeze({ ...(phone ? { phone } : {}), ...(email ? { email } : {}), ...(telegram ? { telegram } : {}) });
|