@whiteslove/parsing-lexicon 0.9.4 → 0.9.5

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.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Shared deterministic multilingual parsing lexicon for WhitesLove housing and hiring services",
5
5
  "repository": {
6
6
  "type": "git",
@@ -63,3 +63,22 @@ export function isDirectOwner(value) {
63
63
  export function hasZeroCommissionSignal(value) {
64
64
  return isDirectOwner(value) || (Boolean(value) && EXPLICIT_ZERO_COMMISSION_RE.test(String(value)));
65
65
  }
66
+
67
+ // A Telegram group's own "welcome"/intro post routinely names the group
68
+ // itself, and a real-estate group is typically named after what it rents
69
+ // out ("Оренда квартир Одеса"). That alone can satisfy HOUSING_RE-style
70
+ // content gates even though the message describes no property at all -- it
71
+ // is a greeting, not a listing. No genuine single-property ad opens with
72
+ // "welcome to the group", so this is safe to treat as a strong, low-noise
73
+ // signal on its own.
74
+ const GROUP_WELCOME_RE = /(?:добро\s+пожаловать\s+в\s+групп\p{L}*|ласкаво\s+просимо\s+(?:до|в)\s+груп\p{L}*|welcome\s+to\s+(?:the\s+|our\s+)?group|bine\s+a[țt]i\s+venit\s+[îi]n\s+grup|guruhga\s+xush\s+kelibsiz|топқа\s+қош\s+келдіңіз)/iu;
75
+
76
+ /**
77
+ * A group's channel welcome/intro post, or an off-topic channel
78
+ * cross-promotion riding on the group's housing-flavored name -- neither
79
+ * describes a specific property and both should be excluded from listing
80
+ * feeds even when they incidentally contain housing keywords.
81
+ */
82
+ export function looksLikeGroupWelcomeMessage(value) {
83
+ return Boolean(value) && GROUP_WELCOME_RE.test(String(value));
84
+ }