""" fake_platform_solidarity.py — fake platform / solidarity entry ================================================ The Jurisprudence Almanac For The Homeless Traveller™ Entry 20 — The Fake Platform Entry Seed / calibration: MODEL, NOT A VERIFIED SEC QUOTE. Full text of SEC Press Release 2026-115 was not retrieved in this turn. Do NOT treat the SEED sentence below as a quote from the SEC. It is a title-paraphrase from the user's link, used only to test that the counter works. Replace it with a verbatim quote from the SEC complaint / release once verified, and re-run. What this counts: quoted conduct, not people. - "fake crypto asset trading platforms" - "investment confidence scam(s)" - "purported crypto asset trading platforms" - "fake investment advisory services" It does NOT count nationality, ethnicity, language, location, or passport as evidence. An operator being "located overseas" is not a finding that a people committed fraud. Scope: DIFFERENT from pompous.py. pompous.py counts sec.gov/newsroom/speeches-statements/* SPEECHES. SEC 2026-115 is a PRESS RELEASE, not a speech. Its phrases are never merged into pompous.py totals. FILED/CITED vs MODEL: FILED = SEC press release / complaint, once verified MODEL = this module's counts, labels, translations The Bone / Solidarity Principle: Fraud has no borders. Victims have no borders. Chinese translation, PROPOSED, NOT IN SOURCE: "骗子无国界,受害者亦无国界。" Method gift: exact-count, quote-don't-paraphrase, quoted-excluded, seed=1. Any regulator — including Chinese regulators — can run the same method on their own releases without adopting US conclusions about crypto legality. The US charges fraud. China bans virtual-currency trading outright. Solidarity here is on stopping fake platforms and protecting victims, not on agreeing about whether crypto itself is legal. Chinese phrases below are PROPOSED TRANSLATION / PROPOSED SEMANTIC, NOT IN SOURCE. They are never counted as SEC phrases, never merged with English counts, and never treated as proof that a Chinese text says what the SEC text says. Copyright: Albert Lane. User retains all license rights. No Hat, Wig or Pompous Assholes In the Courtroom™ — Albert Lane """ from __future__ import annotations import re __version__ = "1.0.0-fake-platform-solidarity" __trademark__ = "fake platform™" SEED_SPEECH = { "title": "SEC Press Release 2026-115 — MODEL TITLE PARAPHRASE, NOT VERIFIED QUOTE", "speaker": "SEC (press release, not a speech)", "date": "2026-11-18 / 2026-11-19 window, verify from SEC.gov", "url": "https://www.sec.gov/newsroom/press-releases/2026-115-sec-eight-entities-used-fake-crypto-asset-trading-platforms-steal-more-37-million-us-investors", } # MODEL seed only — replace with verbatim SEC quote once verified SEED_TEXT = ( "Eight entities used fake crypto asset trading platforms " "to steal more than $37 million from US investors." ) def _normalize_for_matching(text): if text is None: return "" t=str(text) t=t.replace("\u201c",'"').replace("\u201d",'"').replace("\u201e",'"') t=t.replace("\u2018","'").replace("\u2019","'").replace("\u201a","'") t=t.replace("\u00ab",'"').replace("\u00bb",'"') t=t.replace("\u00a0"," ").replace("\u2009"," ").replace("\u200a"," ") t=re.sub(r"(\w)-\r?\n\s*",r"\1",t); t=re.sub(r"(\w)-\s*\n\s*",r"\1",t); t=re.sub(r"\s+"," ",t) return t.strip() _EXACT_PATTERNS = [ r"\bfake\s+crypto\s+asset\s+trading\s+platforms?\b", r"\bpurported\s+crypto\s+asset\s+trading\s+platforms?\b", r"\bfake\s+investment\s+advisory\s+services?\b", r"\binvestment\s+confidence\s+scams?\b", ] _SENT_PAT = re.compile(r"[^.!?]+[.!?]+[\"']?\s*|[^.!?]+$", re.DOTALL) # PROPOSED Chinese glosses — NOT IN SOURCE, never merged with English counts CHINESE_PROPOSED = [ ("虚假加密货币交易平台", "PROPOSED: fake crypto asset trading platform"), ("冒充投资顾问", "PROPOSED: impersonating / fake investment adviser"), ("投资信心诈骗", "PROPOSED: investment confidence scam"), ("杀猪盘", "PROPOSED: pig-butchering / confidence scam — use only if source actually uses it"), ] def FakePlatform(text, *, return_contexts=True, context_window=2): """Count fake-platform conduct phrases. Quoted excluded from total. None/empty -> zeros.""" if text is None: text="" if not isinstance(text,str): text=str(text) normalized=_normalize_for_matching(text) def _empty(): return {"exact_count":0,"quoted_count":0,"total_count":0,"hits":[]} if not normalized.strip(): return _empty() sentences=[] for m in _SENT_PAT.finditer(normalized): s=m.group(0).strip() if s: sentences.append((m.start(),m.end(),s)) if not sentences: sentences=[(0,len(normalized),normalized.strip())] def _idx(pos): for i,(a,b,_) in enumerate(sentences): if a<=posss for ss,ee in spans): continue quoted=_is_quoted(s); typ="quoted" if quoted else "exact" si=_idx(s); hits.append({"match":m.group(0),"type":typ,"sentence":sentences[si][2],"context":_context(si),"start":s,"end":e}); spans.append((s,e)) hits.sort(key=lambda x:x["start"]) exact=sum(1 for h in hits if h["type"]=="exact"); quoted=sum(1 for h in hits if h["type"]=="quoted") return {"exact_count":exact,"quoted_count":quoted,"total_count":exact,"hits":hits} def ChineseProposed(text, *, return_contexts=True, context_window=2): """Separate counter for PROPOSED Chinese phrases. Never merge with FakePlatform(). Returns proposed_count only.""" if text is None: text="" if not isinstance(text,str): text=str(text) normalized=_normalize_for_matching(text) if not normalized.strip(): return {"proposed_count":0,"hits":[]} sentences=[] for m in _SENT_PAT.finditer(normalized): s=m.group(0).strip() if s: sentences.append((m.start(),m.end(),s)) if not sentences: sentences=[(0,len(normalized),normalized.strip())] def _idx(pos): for i,(a,b,_) in enumerate(sentences): if a<=pos