forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
1819 lines (1555 loc) · 85.8 KB
/
Copy pathmain.py
File metadata and controls
1819 lines (1555 loc) · 85.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
IQ Rating Plugin - Rate everyone you've met by IQ score
A simple, viral-optimized app that shows all people you've met
sorted by their IQ scores (smartest to dumbest).
"""
from fastapi import APIRouter, Query, HTTPException
from fastapi.responses import HTMLResponse, JSONResponse
from typing import List, Optional, Dict
import logging
import os
import requests
import hashlib
import random
import re
import time
import threading
import sqlite3
import json
from pathlib import Path
# Setup logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)
# Initialize router
router = APIRouter(
prefix="/iq-rating",
tags=["iq-rating"],
)
# API credentials
OMI_APP_ID = os.getenv("OMI_APP_ID", "01KCMNCPS9K8EV50BEJ37C0RH7")
OMI_APP_SECRET = os.getenv("OMI_APP_SECRET", "sk_d151b7b791931b66b6781163ee3a5773")
OMI_BASE_API_URL = os.getenv("OMI_BASE_API_URL", "https://api.omi.me")
# OpenAI for name filtering
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
# Database path
DB_PATH = Path(__file__).parent / "iq_rating.db"
# In-memory cache for quick access
_cache = {}
_cache_loading = set()
# ============== DATABASE FUNCTIONS ==============
def init_db():
"""Initialize SQLite database with required tables."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
# Store raw memories/conversations data (downloaded once)
c.execute('''CREATE TABLE IF NOT EXISTS user_raw_data (
uid TEXT PRIMARY KEY,
memories TEXT,
conversations TEXT,
fetched_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)''')
# Store processed people with IQ scores
c.execute('''CREATE TABLE IF NOT EXISTS people (
id TEXT PRIMARY KEY,
uid TEXT,
name TEXT,
iq INTEGER,
mention_count INTEGER,
is_hidden INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)''')
# Index for faster lookups
c.execute('CREATE INDEX IF NOT EXISTS idx_people_uid ON people(uid)')
c.execute('CREATE INDEX IF NOT EXISTS idx_people_hidden ON people(uid, is_hidden)')
conn.commit()
conn.close()
logger.info("Database initialized")
def has_user_data(uid: str) -> bool:
"""Check if we already have data for this user."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('SELECT 1 FROM user_raw_data WHERE uid = ?', (uid,))
result = c.fetchone() is not None
conn.close()
return result
def store_raw_data(uid: str, memories: List[dict], conversations: List[dict]):
"""Store raw memories and conversations for a user (once and for all)."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('''INSERT OR REPLACE INTO user_raw_data (uid, memories, conversations, fetched_at)
VALUES (?, ?, ?, CURRENT_TIMESTAMP)''',
(uid, json.dumps(memories), json.dumps(conversations)))
conn.commit()
conn.close()
logger.info(f"Stored raw data for {uid[:8]}: {len(memories)} memories, {len(conversations)} conversations")
def get_raw_data(uid: str) -> tuple:
"""Get stored raw data for a user."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('SELECT memories, conversations FROM user_raw_data WHERE uid = ?', (uid,))
row = c.fetchone()
conn.close()
if row:
return json.loads(row[0]), json.loads(row[1])
return [], []
def store_people(uid: str, people: List[dict]):
"""Store processed people data."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
for person in people:
c.execute('''INSERT OR REPLACE INTO people (id, uid, name, iq, mention_count, is_hidden)
VALUES (?, ?, ?, ?, ?,
COALESCE((SELECT is_hidden FROM people WHERE id = ?), 0))''',
(person['id'], uid, person['name'], person['iq'], person['memory_count'], person['id']))
conn.commit()
conn.close()
logger.info(f"Stored {len(people)} people for {uid[:8]}")
def get_people_from_db(uid: str, include_hidden: bool = False) -> List[dict]:
"""Get processed people for a user from database."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
if include_hidden:
c.execute('SELECT id, name, iq, mention_count, is_hidden FROM people WHERE uid = ? ORDER BY iq DESC', (uid,))
else:
c.execute('SELECT id, name, iq, mention_count, is_hidden FROM people WHERE uid = ? AND is_hidden = 0 ORDER BY iq DESC', (uid,))
rows = c.fetchall()
conn.close()
people = []
for row in rows:
category, emoji, color = get_iq_category(row[2])
people.append({
'id': row[0],
'name': row[1],
'iq': row[2],
'memory_count': row[3],
'is_hidden': bool(row[4]),
'category': category,
'category_emoji': emoji,
'category_color': color
})
return people
def hide_person(uid: str, person_id: str) -> bool:
"""Hide a person from the list (mark as not a real name)."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('UPDATE people SET is_hidden = 1 WHERE uid = ? AND id = ?', (uid, person_id))
affected = c.rowcount
conn.commit()
conn.close()
# Clear cache
if uid in _cache:
del _cache[uid]
return affected > 0
def adjust_iq(uid: str, person_id: str, delta: int) -> Optional[int]:
"""Adjust a person's IQ score by delta (+/- amount)."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('SELECT iq FROM people WHERE uid = ? AND id = ?', (uid, person_id))
row = c.fetchone()
if row:
new_iq = max(50, min(180, row[0] + delta))
c.execute('UPDATE people SET iq = ? WHERE uid = ? AND id = ?', (new_iq, uid, person_id))
conn.commit()
# Clear cache
if uid in _cache:
del _cache[uid]
conn.close()
return new_iq
conn.close()
return None
def unhide_person(uid: str, person_id: str) -> bool:
"""Unhide a person."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('UPDATE people SET is_hidden = 0 WHERE uid = ? AND id = ?', (uid, person_id))
affected = c.rowcount
conn.commit()
conn.close()
# Clear cache
if uid in _cache:
del _cache[uid]
return affected > 0
def has_people_in_db(uid: str) -> bool:
"""Check if we have processed people for this user."""
conn = sqlite3.connect(DB_PATH)
c = conn.cursor()
c.execute('SELECT COUNT(*) FROM people WHERE uid = ?', (uid,))
count = c.fetchone()[0]
conn.close()
return count > 0
# Initialize database on module load
init_db()
# ============== OPENAI NAME FILTERING ==============
def filter_names_with_openai(names: List[str]) -> List[str]:
"""Use OpenAI to filter out non-names from a list."""
if not names:
return []
if not OPENAI_API_KEY:
logger.warning("No OpenAI API key - names will not be AI-filtered")
return names
try:
valid_names = []
batch_size = 50 # Process in batches
for i in range(0, len(names), batch_size):
batch = names[i:i + batch_size]
names_str = ", ".join(batch)
response = requests.post(
"https://api.openai.com/v1/chat/completions",
headers={
"Authorization": f"Bearer {OPENAI_API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": """You are a name validator. Given a list of words, return ONLY the ones that are real human first names or last names.
Rules:
- Include common first names from any culture (English, Spanish, Russian, Chinese, Indian, Arabic, etc.)
- Include common last names (especially recognizable ones like "Draper", "Smith", "Chen")
- EXCLUDE: verbs, adjectives, common nouns, places, companies, products, brands
- EXCLUDE: words like "Forbes", "Finalizes", "Smart", "Quick", "Express"
- Be strict - when in doubt, exclude
Return as a comma-separated list. If none are names, return 'NONE'."""
},
{
"role": "user",
"content": f"Which of these are real human names? {names_str}"
}
],
"temperature": 0,
"max_tokens": 500
},
timeout=30
)
if response.status_code == 200:
result = response.json()
answer = result["choices"][0]["message"]["content"].strip()
if answer.upper() != "NONE":
batch_valid = [n.strip() for n in answer.split(",") if n.strip()]
valid_names.extend(batch_valid)
else:
logger.error(f"OpenAI API error: {response.status_code}")
# On error, skip this batch
logger.info(f"AI filtered {len(names)} -> {len(valid_names)} names")
return valid_names
except Exception as e:
logger.error(f"Error filtering names with AI: {e}")
return names
# ============== DATA FETCHING ==============
def fetch_all_memories(uid: str) -> List[dict]:
"""Fetch ALL memories for a user."""
try:
all_memories = []
offset = 0
limit = 100
while True:
url = f"{OMI_BASE_API_URL}/v2/integrations/{OMI_APP_ID}/memories"
params = {"uid": uid, "limit": limit, "offset": offset}
headers = {
"Authorization": f"Bearer {OMI_APP_SECRET}",
"Content-Type": "application/json",
}
response = requests.get(url, params=params, headers=headers, timeout=30)
if response.status_code == 200:
data = response.json()
memories = data if isinstance(data, list) else data.get("memories", [])
if not memories:
break
all_memories.extend(memories)
if len(memories) < limit:
break
offset += limit
elif response.status_code == 429:
logger.warning("Rate limited, waiting 2 seconds...")
time.sleep(2)
continue
else:
logger.error(f"Failed to fetch memories: {response.status_code}")
break
logger.info(f"Fetched {len(all_memories)} total memories")
return all_memories
except Exception as e:
logger.error(f"Error fetching memories: {e}")
return []
def fetch_all_conversations(uid: str) -> List[dict]:
"""Fetch ALL conversations for a user."""
try:
all_conversations = []
offset = 0
limit = 100
while True:
url = f"{OMI_BASE_API_URL}/v2/integrations/{OMI_APP_ID}/conversations"
params = {"uid": uid, "limit": limit, "offset": offset}
headers = {
"Authorization": f"Bearer {OMI_APP_SECRET}",
"Content-Type": "application/json",
}
response = requests.get(url, params=params, headers=headers, timeout=30)
if response.status_code == 200:
data = response.json()
conversations = data if isinstance(data, list) else data.get("conversations", [])
if not conversations:
break
all_conversations.extend(conversations)
if len(conversations) < limit:
break
offset += limit
elif response.status_code == 429:
logger.warning("Rate limited, waiting 2 seconds...")
time.sleep(2)
continue
else:
logger.error(f"Failed to fetch conversations: {response.status_code}")
break
logger.info(f"Fetched {len(all_conversations)} total conversations")
return all_conversations
except Exception as e:
logger.error(f"Error fetching conversations: {e}")
return []
# ============== NAME EXTRACTION ==============
def get_user_name_variations(memories: List[dict], conversations: List[dict]) -> set:
"""Extract the main user's name and common variations to exclude."""
name_counts = {}
nickname_groups = {
'nik': {'nik', 'nick', 'nikita', 'nikolay', 'nikolai', 'nicky', 'nicolas', 'nicholas'},
'alex': {'alex', 'alexander', 'alexis', 'alejandro', 'sasha', 'xander'},
'mike': {'mike', 'michael', 'mick', 'mickey', 'mikey'},
'dan': {'dan', 'daniel', 'danny', 'daniela'},
'chris': {'chris', 'christopher', 'christian', 'kristopher'},
'matt': {'matt', 'matthew', 'mateo', 'matthias', 'matteo'},
'tom': {'tom', 'thomas', 'tommy', 'tomas'},
'rob': {'rob', 'robert', 'robbie', 'bob', 'bobby', 'roberto'},
'will': {'will', 'william', 'bill', 'billy', 'liam'},
'joe': {'joe', 'joseph', 'joey', 'jose'},
'sam': {'sam', 'samuel', 'sammy', 'samantha'},
'ben': {'ben', 'benjamin', 'benji', 'benny'},
'jake': {'jake', 'jacob', 'jacoby'},
'andy': {'andy', 'andrew', 'drew', 'andre', 'andreas'},
'dave': {'dave', 'david', 'davey'},
'steve': {'steve', 'steven', 'stephen', 'stefan'},
'john': {'john', 'johnny', 'jonathan', 'jon', 'johan'},
'jim': {'jim', 'james', 'jimmy', 'jamie'},
'tony': {'tony', 'anthony', 'antonio'},
'paul': {'paul', 'paulo', 'pablo', 'pavel'},
}
name_to_group = {}
for group_key, names in nickname_groups.items():
for name in names:
name_to_group[name] = group_key
all_text = ""
for memory in memories:
all_text += " " + memory.get("content", "")
for conv in conversations:
structured = conv.get("structured", {})
all_text += " " + structured.get("overview", "")
all_text += " " + structured.get("title", "")
for seg in conv.get("transcript_segments", []):
all_text += " " + seg.get("text", "")
words = re.findall(r'\b([A-Z][a-z]{2,14})\b', all_text)
for word in words:
word_lower = word.lower()
name_counts[word_lower] = name_counts.get(word_lower, 0) + 1
group_counts = {}
for name, count in name_counts.items():
if name in name_to_group:
group = name_to_group[name]
group_counts[group] = group_counts.get(group, 0) + count
user_variations = set()
if group_counts:
top_group = max(group_counts, key=group_counts.get)
if group_counts[top_group] >= 50:
user_variations = nickname_groups[top_group]
logger.info(f"Detected user name group: {top_group} with {group_counts[top_group]} mentions")
if name_counts:
top_name = max(name_counts, key=name_counts.get)
if name_counts[top_name] >= 100 and top_name in name_to_group:
user_variations.add(top_name)
user_variations.update(nickname_groups[name_to_group[top_name]])
user_variations = {v for v in user_variations if len(v) >= 2}
logger.info(f"User name variations to exclude: {user_variations}")
return user_variations
def extract_names_from_text(text: str) -> List[str]:
"""Extract potential names from text using patterns."""
names = set()
# Common name patterns
# Pattern 1: "Name:" or "Name -" at start of line
pattern1 = re.findall(r'(?:^|\n)\s*([A-Z][a-z]+)(?:\s*[:\-])', text)
names.update(pattern1)
# Pattern 2: Capitalized words that look like names (2-15 chars, not common words)
common_words = {'The', 'This', 'That', 'What', 'When', 'Where', 'How', 'Why', 'Who',
'Yes', 'Yeah', 'No', 'Not', 'But', 'And', 'Or', 'So', 'If', 'Then',
'Here', 'There', 'Now', 'Just', 'Like', 'Also', 'Very', 'Really',
'Okay', 'Right', 'Well', 'Actually', 'Basically', 'Maybe', 'Probably',
'Something', 'Everything', 'Nothing', 'Anything', 'Someone', 'Everyone',
'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday',
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August',
'September', 'October', 'November', 'December', 'Today', 'Tomorrow', 'Yesterday',
'Morning', 'Afternoon', 'Evening', 'Night', 'Week', 'Month', 'Year',
'Because', 'However', 'Therefore', 'Although', 'Though', 'Since', 'Before',
'After', 'During', 'While', 'Until', 'Unless', 'Whether', 'Either', 'Neither',
'Both', 'Each', 'Every', 'Some', 'Any', 'All', 'Most', 'Many', 'Few', 'Several',
'Other', 'Another', 'Such', 'Same', 'Different', 'New', 'Old', 'Good', 'Bad',
'First', 'Last', 'Next', 'Best', 'Worst', 'More', 'Less', 'Much', 'Little',
'Sure', 'Hmm', 'Mhmm', 'Uhm', 'Uh', 'Oh', 'Ah', 'Wow', 'Hey', 'Hi', 'Hello',
'Thanks', 'Thank', 'Please', 'Sorry', 'Excuse', 'Bro', 'Dude', 'Man', 'Guy',
'People', 'Person', 'Thing', 'Things', 'Stuff', 'Way', 'Time', 'Place',
'App', 'Apps', 'Phone', 'Device', 'Video', 'Audio', 'Button', 'Screen',
'Company', 'Business', 'Work', 'Project', 'Team', 'Meeting', 'Call',
'Speaker', 'User', 'Users', 'Customer', 'Customers', 'Client', 'Clients',
# Tech/Companies/Products (not people)
'Google', 'Apple', 'Microsoft', 'Amazon', 'Facebook', 'Meta', 'Twitter',
'Gmail', 'Drive', 'Docs', 'Sheets', 'Slack', 'Zoom', 'Discord', 'Notion',
'Github', 'Gitlab', 'Figma', 'Canva', 'Stripe', 'Shopify', 'Salesforce',
'Deepgram', 'Rewind', 'Mixpanel', 'Segment', 'Amplitude', 'Firebase',
'Hardware', 'Software', 'Website', 'Database', 'Server', 'Cloud', 'Api',
'Mac', 'Windows', 'Linux', 'Ios', 'Android', 'Chrome', 'Safari', 'Firefox',
'Dropbox', 'Icloud', 'Onedrive', 'Box', 'Evernote', 'Trello', 'Asana', 'Jira',
# Places (not people)
'America', 'Europe', 'Asia', 'Africa', 'Australia', 'Canada', 'Mexico',
'China', 'India', 'Japan', 'Korea', 'Russia', 'Brazil', 'Germany', 'France',
'London', 'Paris', 'Tokyo', 'Beijing', 'Dubai', 'Singapore', 'Sydney',
'Angeles', 'Francisco', 'York', 'Chicago', 'Miami', 'Boston', 'Seattle',
'Bay', 'Area', 'Valley', 'Hills', 'Beach', 'City', 'Town', 'Street',
'Koreatown', 'Hollywood', 'Downtown', 'Midtown', 'Uptown',
'Indian', 'Chinese', 'Japanese', 'Korean', 'Russian', 'Vietnamese', 'Mexican',
'American', 'European', 'Asian', 'African', 'Australian',
'Kazakhstan', 'Ukraine', 'Poland', 'Italy', 'Spain', 'England',
'German', 'French', 'Spanish', 'Italian', 'British', 'Dutch', 'Swedish',
'Turkish', 'Portuguese', 'Arabic', 'Hebrew', 'Thai',
'Florida', 'Georgia', 'Alabama', 'Texas', 'Nevada', 'Arizona', 'Ohio',
'Iowa', 'Maine', 'Utah', 'Idaho', 'Kansas', 'Montana', 'Wyoming', 'Vermont',
'Alaska', 'Hawaii', 'Delaware', 'Maryland', 'Virginia', 'Carolina', 'Dakota',
'Nebraska', 'Oklahoma', 'Arkansas', 'Louisiana', 'Mississippi', 'Tennessee',
'Kentucky', 'Indiana', 'Illinois', 'Wisconsin', 'Michigan', 'Missouri',
'Connecticut', 'Massachusetts', 'Pennsylvania', 'Minnesota', 'Oregon',
'Britain', 'California', 'Pakistan', 'Shanghai', 'Brooklyn', 'Sakhalin',
'Vancouver', 'Shenzhen', 'Basel', 'Vegas',
# Common non-name words
'Action', 'Capital', 'League', 'Ivy', 'Black', 'White', 'Red', 'Blue', 'Green',
'For', 'Looks', 'Thin', 'Omni', 'Geo', 'San', 'Los', 'Las', 'Del', 'La',
'Residency', 'Software', 'Butcher', 'Amish', 'Sikh',
'Jewish', 'Christian', 'Muslim', 'Hindu', 'Buddhist',
# Short common words that get capitalized
'In', 'On', 'At', 'To', 'Up', 'By', 'Is', 'It', 'As', 'Of', 'Be', 'Do', 'Go',
'Me', 'We', 'Us', 'He', 'My', 'An', 'Am', 'So', 'Or', 'If', 'No',
# More common words mistaken as names
'Plan', 'Chat', 'Later', 'Wearable', 'Founders', 'Founder', 'Device',
'Telegram', 'Airbnb', 'Uber', 'Lyft', 'Paypal', 'Venmo', 'Cashapp',
'Podcast', 'Recording', 'Conversation', 'Memory', 'Memories',
'Focus', 'Growth', 'Revenue', 'Startup', 'Startups', 'Investment',
'Feature', 'Features', 'Product', 'Products', 'Service', 'Services',
'Experience', 'Performance', 'Quality', 'Content', 'Context',
'Example', 'Examples', 'Process', 'System', 'Systems', 'Platform',
'Issue', 'Issues', 'Problem', 'Problems', 'Solution', 'Solutions',
'Question', 'Questions', 'Answer', 'Answers', 'Comment', 'Comments',
'Test', 'Tests', 'Build', 'Builds', 'Deploy', 'Release', 'Launch',
'Event', 'Events', 'Session', 'Sessions', 'Message', 'Messages',
'Update', 'Updates', 'Change', 'Changes', 'Version', 'Versions',
'Data', 'Info', 'Information', 'Details', 'Summary', 'Overview',
'Hadron', 'Omi', 'Api', 'Sdk', 'Cli', 'Ui', 'Ux',
'Ref', 'Doc', 'Docs', 'Log', 'Logs', 'Debug', 'Error', 'Errors',
# More non-person words
'Wi', 'Fi', 'Wifi', 'Bluetooth', 'Usb', 'Nfc', 'Gps',
'Friends', 'Friend', 'Family', 'Mom', 'Dad', 'Brother', 'Sister',
'Fundraise', 'Fundraising', 'Funding', 'Investment', 'Investors',
'Frontier', 'Spark', 'Labs', 'Lab', 'Studio', 'Studios', 'Agency',
'Stanford', 'Harvard', 'Mit', 'Berkeley', 'Yale', 'Princeton',
'Van', 'Von', 'De', 'Le', 'Al', 'El',
'Don', 'Dont', 'Its', 'Were', 'Been', 'Being', 'Have', 'Has', 'Had',
'Got', 'Get', 'Gets', 'Let', 'Lets', 'Use', 'Uses', 'Used',
'Try', 'Tries', 'Tried', 'Make', 'Makes', 'Made', 'Take', 'Takes', 'Took',
'See', 'Sees', 'Saw', 'Know', 'Knows', 'Knew', 'Think', 'Thinks', 'Thought',
'Feel', 'Feels', 'Felt', 'Want', 'Wants', 'Wanted', 'Need', 'Needs', 'Needed',
'Say', 'Says', 'Said', 'Tell', 'Tells', 'Told', 'Ask', 'Asks', 'Asked',
'Give', 'Gives', 'Gave', 'Put', 'Puts', 'Keep', 'Keeps', 'Kept',
'Find', 'Finds', 'Found', 'Show', 'Shows', 'Showed', 'Add', 'Adds', 'Added',
'Run', 'Runs', 'Ran', 'Move', 'Moves', 'Moved', 'Play', 'Plays', 'Played',
'Live', 'Lives', 'Lived', 'Look', 'Seem', 'Seems', 'Seemed',
'Talk', 'Talks', 'Talked', 'Meet', 'Meets', 'Met',
# Time-related
'Hour', 'Hours', 'Minute', 'Minutes', 'Second', 'Seconds',
'Day', 'Days', 'Ago', 'End', 'Start', 'Started', 'Ended',
# Numbers written out
'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten',
'Hundred', 'Thousand', 'Million', 'Billion',
# More common nouns/verbs that get capitalized
'Bowl', 'Fellowship', 'Aid', 'Party', 'Create', 'Together', 'Faith', 'Virality',
'Procrastination', 'Assistant', 'Super', 'Mega', 'Ultra', 'Pro', 'Max', 'Mini',
'Recording', 'Transcript', 'Segment', 'Segments', 'File', 'Files', 'Folder',
'Talk', 'Talks', 'Speech', 'Speeches', 'Voice', 'Voices', 'Sound', 'Sounds',
'Word', 'Words', 'Letter', 'Letters', 'Sentence', 'Sentences', 'Paragraph',
'Image', 'Images', 'Photo', 'Photos', 'Picture', 'Pictures', 'Video', 'Videos',
'Music', 'Song', 'Songs', 'Movie', 'Movies', 'Film', 'Films', 'Show', 'Shows',
'Book', 'Books', 'Article', 'Articles', 'Post', 'Posts', 'Blog', 'Blogs',
'Story', 'Stories', 'News', 'Report', 'Reports', 'Paper', 'Papers',
'List', 'Lists', 'Item', 'Items', 'Task', 'Tasks', 'Goal', 'Goals',
'Idea', 'Ideas', 'Thought', 'Thoughts', 'Mind', 'Brain', 'Head',
'Body', 'Heart', 'Hand', 'Hands', 'Eye', 'Eyes', 'Ear', 'Ears',
'Room', 'Rooms', 'House', 'Houses', 'Home', 'Homes', 'Office', 'Offices',
'Car', 'Cars', 'Bus', 'Buses', 'Train', 'Trains', 'Plane', 'Planes',
'Food', 'Foods', 'Water', 'Coffee', 'Tea', 'Wine', 'Beer', 'Drink', 'Drinks',
'Money', 'Cash', 'Dollar', 'Dollars', 'Price', 'Prices', 'Cost', 'Costs',
'Job', 'Jobs', 'Career', 'Careers', 'Role', 'Roles', 'Position', 'Positions',
'Level', 'Levels', 'Grade', 'Grades', 'Score', 'Scores', 'Point', 'Points',
'Game', 'Games', 'Sport', 'Sports', 'Match', 'Matches', 'Race', 'Races',
'Trip', 'Trips', 'Travel', 'Travels', 'Tour', 'Tours', 'Visit', 'Visits',
'School', 'Schools', 'College', 'Colleges', 'University', 'Universities',
'Class', 'Classes', 'Course', 'Courses', 'Lesson', 'Lessons', 'Study', 'Studies',
'Research', 'Science', 'Math', 'History', 'Art', 'Arts', 'Design', 'Designs',
'Code', 'Codes', 'Program', 'Programs', 'Script', 'Scripts', 'Function', 'Functions',
'Model', 'Models', 'Framework', 'Frameworks', 'Library', 'Libraries', 'Tool', 'Tools',
'Set', 'Sets', 'Group', 'Groups', 'Type', 'Types', 'Kind', 'Kinds', 'Sort', 'Sorts',
'Part', 'Parts', 'Piece', 'Pieces', 'Bit', 'Bits', 'Side', 'Sides', 'Half', 'Halves',
'Top', 'Bottom', 'Front', 'Back', 'Left', 'Right', 'Middle', 'Center',
'High', 'Low', 'Long', 'Short', 'Big', 'Small', 'Large', 'Tiny', 'Huge',
'Fast', 'Slow', 'Quick', 'Easy', 'Hard', 'Simple', 'Complex', 'Basic', 'Advanced',
'True', 'False', 'Real', 'Fake', 'Full', 'Empty', 'Open', 'Close', 'Closed',
'Free', 'Paid', 'Public', 'Private', 'Local', 'Global', 'Internal', 'External',
'Main', 'Core', 'Key', 'Keys', 'Primary', 'Secondary', 'Special', 'Normal',
'Current', 'Previous', 'Future', 'Past', 'Present', 'Recent', 'Latest', 'Oldest',
'Only', 'Even', 'Still', 'Already', 'Yet', 'Soon', 'Always', 'Never', 'Often',
'App', 'Web', 'Site', 'Page', 'Pages', 'Link', 'Links', 'Tab', 'Tabs',
'Menu', 'Menus', 'Icon', 'Icons', 'Logo', 'Logos', 'Brand', 'Brands',
'Fun', 'Cool', 'Great', 'Amazing', 'Awesome', 'Nice', 'Fine', 'Okay',
'Perfect', 'Excellent', 'Wonderful', 'Beautiful', 'Pretty', 'Cute', 'Sweet',
# More company/product/brand names
'Paradromics', 'Snapchat', 'Tiktok', 'Instagram', 'Youtube', 'Reddit', 'Linkedin',
'Whatsapp', 'Messenger', 'Signal', 'Wechat', 'Line', 'Skype', 'Teams',
'Netflix', 'Hulu', 'Disney', 'Spotify', 'Pandora', 'Soundcloud',
'Pinterest', 'Tumblr', 'Quora', 'Medium', 'Substack', 'Patreon',
# More common nouns
'Corp', 'Corporation', 'Park', 'Parks', 'Media', 'Ive', 'Clue', 'Upcoming',
'Sale', 'Sales', 'Choices', 'Choice', 'Quiet', 'Teammates', 'Teammate',
'Bank', 'Banks', 'Insurance', 'Finance', 'Trading', 'Crypto', 'Bitcoin',
'Camera', 'Cameras', 'Lens', 'Lenses', 'Battery', 'Batteries', 'Charger',
'Keyboard', 'Mouse', 'Monitor', 'Laptop', 'Desktop', 'Tablet', 'Smartphone',
'Light', 'Lights', 'Dark', 'Bright', 'Dim', 'Color', 'Colors', 'Colour',
'Hot', 'Cold', 'Warm', 'Cool', 'Fresh', 'Clean', 'Dirty', 'Clear', 'Cloudy',
'Crazy', 'Weird', 'Strange', 'Normal', 'Regular', 'Special', 'Extra', 'Standard',
'Powerful', 'Weak', 'Strong', 'Soft', 'Hard', 'Smooth', 'Rough', 'Sharp', 'Dull',
'Happy', 'Sad', 'Angry', 'Scared', 'Excited', 'Tired', 'Bored', 'Confused',
'Certain', 'Sure', 'Unsure', 'Confident', 'Nervous', 'Calm', 'Stressed',
'Busy', 'Idle', 'Active', 'Passive', 'Ready', 'Waiting', 'Pending', 'Done',
'Anyway', 'Somehow', 'Somewhat', 'Sometimes', 'Everywhere', 'Nowhere', 'Anywhere',
'Basically', 'Literally', 'Honestly', 'Seriously', 'Obviously', 'Apparently',
'Generally', 'Specifically', 'Exactly', 'Roughly', 'Approximately', 'Almost',
'Probably', 'Possibly', 'Certainly', 'Definitely', 'Surely', 'Clearly',
'Usually', 'Typically', 'Normally', 'Regularly', 'Frequently', 'Rarely',
'Currently', 'Previously', 'Recently', 'Eventually', 'Finally', 'Initially',
# Verbs that get capitalized
'Watching', 'Listening', 'Reading', 'Writing', 'Speaking', 'Talking', 'Walking',
'Running', 'Driving', 'Flying', 'Swimming', 'Playing', 'Working', 'Sleeping',
'Eating', 'Drinking', 'Cooking', 'Shopping', 'Traveling', 'Learning', 'Teaching',
'Building', 'Creating', 'Making', 'Doing', 'Being', 'Having', 'Getting',
'Coming', 'Going', 'Leaving', 'Staying', 'Moving', 'Changing', 'Growing',
'Starting', 'Ending', 'Beginning', 'Finishing', 'Continuing', 'Stopping',
'Opening', 'Closing', 'Turning', 'Showing', 'Hiding', 'Finding', 'Losing',
'Winning', 'Losing', 'Trying', 'Failing', 'Succeeding', 'Helping', 'Hurting',
# Place names
'Jersey', 'Bristol', 'Navajo', 'Avenue', 'Boulevard', 'Highway', 'Road',
'Mall', 'Plaza', 'Square', 'Center', 'Tower', 'Building', 'Bridge',
# More common words
'Pass', 'Avenir', 'Wick', 'Hobbies', 'Hobby', 'Hiring', 'Express',
'Offer', 'Offers', 'Deal', 'Deals', 'Discount', 'Discounts', 'Promo',
'Membership', 'Subscription', 'Plan', 'Plans', 'Tier', 'Tiers',
'Early', 'Late', 'Morning', 'Evening', 'Afternoon', 'Night', 'Midnight',
'Intro', 'Outro', 'Summary', 'Recap', 'Review', 'Preview', 'Overview',
'Setup', 'Config', 'Settings', 'Options', 'Preferences', 'Profile',
'Account', 'Accounts', 'Login', 'Logout', 'Signin', 'Signup', 'Register',
'Password', 'Username', 'Email', 'Phone', 'Address', 'Location',
'Notification', 'Notifications', 'Alert', 'Alerts', 'Warning', 'Warnings',
'Status', 'Progress', 'Loading', 'Pending', 'Complete', 'Completed',
'Success', 'Failure', 'Error', 'Errors', 'Bug', 'Bugs', 'Issue', 'Issues',
# Even more common words found in output
'Swap', 'Mission', 'Vegas', 'Equity', 'Lodge', 'Discussion', 'Twin', 'Brief',
'Others', 'Catch', 'Emergency', 'Alto', 'View', 'Views', 'Tech', 'Casual',
'Watch', 'Pitches', 'Pitch', 'Equinox', 'Plot', 'Plots', 'Multiple', 'With',
'Joke', 'Jokes', 'Personal', 'Airtable', 'Departure', 'Discusses', 'Knowledge',
'Discuss', 'Space', 'Spaces', 'Store', 'Stores', 'Comedy', 'They', 'Hunt',
'Limitless', 'Passengers', 'Peaks', 'Peak', 'Storage', 'Toward', 'Towards',
'Life', 'Fish', 'Gym', 'Gyms', 'Marketing', 'Partnership', 'Partnerships',
'Flutter', 'Planning', 'Near', 'States', 'State', 'Daily', 'Debates', 'Dating',
'Coordinate', 'Coordinates', 'Ambassador', 'Ambassadors', 'Ventures', 'Venture',
'Out', 'Sleep', 'Overall', 'React', 'Granola', 'Creator', 'Creators', 'Clarifying',
'Network', 'Networks', 'Advice', 'Contact', 'Contacts', 'Debate', 'Zero',
'Their', 'Share', 'Shares', 'Relationships', 'Relationship', 'Speakers',
'Demo', 'Demos', 'Workspace', 'Workspaces', 'Debugging', 'Highlight', 'Highlights',
'Tactics', 'Air', 'Academy', 'Debating', 'Devices', 'Chats', 'Dinner', 'Dinners',
'Haircut', 'General', 'Strategy', 'Strategies', 'Discussing', 'Ads', 'Rent',
'Lounge', 'Lounges', 'Payment', 'Payments', 'Podcasts', 'Series', 'Pay',
'Crowd', 'Crowds', 'Date', 'Dates', 'Celebration', 'Celebrations', 'Human', 'Humans',
'Southern', 'Northern', 'Eastern', 'Western', 'Central', 'United', 'International',
'Kazakh', 'Brazilian', 'Canadian', 'Fluticasone', 'Mercury', 'Santa', 'Zootopia',
'Ritz', 'Carlton', 'Haven', 'Ashby', 'Luma', 'Hipsy', 'Tron', 'Visa', 'Dev',
'Nano', 'About', 'Fifth', 'Basel', 'Shenzhen', 'Vancouver', 'Minnesota', 'Oregon',
'Britain', 'California', 'Pakistan', 'Shanghai', 'Brooklyn', 'Christmas', 'Sakhalin',
'Calhacks', 'Kickstarter', 'Tesla', 'Ness', 'East', 'West', 'South', 'North',
# Final cleanup
'Refines', 'Refine', 'Vietnam', 'English', 'Aurora', 'Palo',
# More words found in output
'Smart', 'Confusion', 'Specific', 'Projects', 'Custom', 'Strategic',
'Productivity', 'Starbucks', 'Entrepreneur', 'Discussions', 'Introduction',
'Amid', 'Seeking', 'Terms', 'Trends', 'Routine', 'Challenge', 'Challenges',
'Insights', 'Insight', 'Potential', 'Impact', 'Key', 'Keys', 'Point', 'Points',
'Topic', 'Topics', 'Theme', 'Themes', 'Aspect', 'Aspects', 'Factor', 'Factors',
'Element', 'Elements', 'Component', 'Components', 'Section', 'Sections',
'Chapter', 'Chapters', 'Episode', 'Episodes', 'Scene', 'Scenes',
'Moment', 'Moments', 'Period', 'Periods', 'Phase', 'Phases', 'Stage', 'Stages',
'Round', 'Rounds', 'Turn', 'Turns', 'Step', 'Steps', 'Move', 'Moves',
'Attempt', 'Attempts', 'Effort', 'Efforts', 'Progress', 'Result', 'Results',
'Outcome', 'Outcomes', 'Effect', 'Effects', 'Consequence', 'Consequences',
'Benefit', 'Benefits', 'Advantage', 'Advantages', 'Opportunity', 'Opportunities',
'Option', 'Options', 'Alternative', 'Alternatives', 'Approach', 'Approaches',
'Method', 'Methods', 'Technique', 'Techniques', 'Practice', 'Practices',
'Principle', 'Principles', 'Concept', 'Concepts', 'Theory', 'Theories',
'Lesson', 'Lessons', 'Tip', 'Tips', 'Trick', 'Tricks', 'Secret', 'Secrets',
'Rule', 'Rules', 'Law', 'Laws', 'Regulation', 'Regulations', 'Policy', 'Policies',
'Standard', 'Standards', 'Requirement', 'Requirements', 'Specification', 'Specifications',
'Criteria', 'Criterion', 'Condition', 'Conditions', 'Situation', 'Situations',
'Circumstance', 'Circumstances', 'Context', 'Contexts', 'Background', 'Backgrounds',
'History', 'Histories', 'Origin', 'Origins', 'Source', 'Sources', 'Root', 'Roots',
'Cause', 'Causes', 'Reason', 'Reasons', 'Purpose', 'Purposes', 'Intention', 'Intentions',
'Objective', 'Objectives', 'Target', 'Targets', 'Aim', 'Aims',
'Priority', 'Priorities', 'Focus', 'Focuses', 'Emphasis', 'Attention',
'Concern', 'Concerns', 'Interest', 'Interests', 'Preference', 'Preferences',
'Opinion', 'Opinions', 'Perspective', 'Perspectives', 'Viewpoint', 'Viewpoints',
'Stance', 'Stances', 'Position', 'Positions', 'Attitude', 'Attitudes',
'Belief', 'Beliefs', 'Value', 'Values', 'Ideal', 'Ideals', 'Vision', 'Visions',
'Dream', 'Dreams', 'Hope', 'Hopes', 'Wish', 'Wishes', 'Desire', 'Desires',
'Need', 'Needs', 'Want', 'Wants', 'Demand', 'Demands', 'Request', 'Requests',
'Suggestion', 'Suggestions', 'Recommendation', 'Recommendations', 'Proposal', 'Proposals',
'Offer', 'Offers', 'Invitation', 'Invitations', 'Call', 'Calls', 'Appeal', 'Appeals',
'Claim', 'Claims', 'Statement', 'Statements', 'Declaration', 'Declarations',
'Announcement', 'Announcements', 'Notice', 'Notices', 'Reminder', 'Reminders',
'Update', 'Updates', 'Revision', 'Revisions', 'Amendment', 'Amendments',
'Modification', 'Modifications', 'Adjustment', 'Adjustments', 'Correction', 'Corrections',
'Improvement', 'Improvements', 'Enhancement', 'Enhancements', 'Upgrade', 'Upgrades',
'Addition', 'Additions', 'Expansion', 'Expansions', 'Extension', 'Extensions',
'Integration', 'Integrations', 'Implementation', 'Implementations', 'Execution', 'Executions',
'Operation', 'Operations', 'Function', 'Functions', 'Activity', 'Activities',
'Transaction', 'Transactions', 'Interaction', 'Interactions', 'Communication', 'Communications',
'Connection', 'Connections', 'Relation', 'Relations', 'Association', 'Associations',
'Collaboration', 'Collaborations', 'Cooperation', 'Cooperations', 'Partnership', 'Partnerships',
'Alliance', 'Alliances', 'Coalition', 'Coalitions', 'Union', 'Unions',
'Organization', 'Organizations', 'Institution', 'Institutions', 'Agency', 'Agencies',
'Department', 'Departments', 'Division', 'Divisions', 'Branch', 'Branches',
'Unit', 'Units', 'Team', 'Teams', 'Group', 'Groups', 'Committee', 'Committees',
'Board', 'Boards', 'Council', 'Councils', 'Panel', 'Panels', 'Commission', 'Commissions',
# Conversational words (found in transcripts)
'Wait', 'Alright', 'Kinda', 'Gotta', 'Using', 'Gonna', 'Wanna', 'Lemme', 'Gimme',
'Addresses', 'Dreamforce', 'Draw', 'Draws', 'Shipping', 'Necklace', 'Enterprise',
'Download', 'Downloads', 'Holy', 'Brilliant', 'Write', 'Writes', 'Wrote',
'Essentially', 'Glad', 'Legal', 'Consumer', 'Consumers', 'Safety', 'Pricing',
'Completely', 'Sounds', 'Feels', 'Seems', 'Looks', 'Works', 'Means', 'Says',
'Thinks', 'Knows', 'Goes', 'Comes', 'Takes', 'Makes', 'Gets', 'Puts', 'Gives',
'Tells', 'Asks', 'Helps', 'Shows', 'Starts', 'Stops', 'Keeps', 'Lets',
'Probably', 'Maybe', 'Actually', 'Really', 'Basically', 'Literally', 'Seriously',
'Honestly', 'Definitely', 'Absolutely', 'Exactly', 'Totally', 'Completely', 'Entirely',
'Apparently', 'Obviously', 'Clearly', 'Simply', 'Basically', 'Essentially', 'Fundamentally',
'Yeah', 'Yep', 'Yup', 'Nope', 'Nah', 'Uh', 'Um', 'Uhm', 'Hmm', 'Huh', 'Wow',
'Ohh', 'Ahh', 'Ooh', 'Aah', 'Whoa', 'Woah', 'Geez', 'Gosh', 'Dang', 'Darn',
'Haha', 'Lol', 'Lmao', 'Omg', 'Omfg', 'Wtf', 'Btw', 'Idk', 'Imo', 'Tbh', 'Ngl',
'Through', 'Though', 'Although', 'However', 'Therefore', 'Otherwise', 'Meanwhile',
'Anyway', 'Anyways', 'Anywhere', 'Anytime', 'Anyone', 'Anything', 'Anybody',
'Somewhere', 'Sometime', 'Someone', 'Something', 'Somebody',
'Everywhere', 'Everyone', 'Everything', 'Everybody', 'Whatever', 'Wherever', 'Whenever',
'Whoever', 'Whichever', 'Whatsoever', 'Nonetheless', 'Nevertheless', 'Furthermore',
'Moreover', 'Besides', 'Instead', 'Rather', 'Either', 'Neither', 'Whether',
'Perhaps', 'Possibly', 'Certainly', 'Surely', 'Simply', 'Merely', 'Hardly', 'Barely',
'Almost', 'Nearly', 'Quite', 'Rather', 'Fairly', 'Pretty', 'Very', 'Extremely',
'Incredibly', 'Amazingly', 'Surprisingly', 'Shockingly', 'Interestingly',
'Fortunately', 'Unfortunately', 'Hopefully', 'Thankfully', 'Luckily',
'Especially', 'Particularly', 'Specifically', 'Generally', 'Usually', 'Typically',
'Normally', 'Commonly', 'Frequently', 'Regularly', 'Occasionally', 'Rarely', 'Seldom',
'Sometimes', 'Often', 'Always', 'Never', 'Ever', 'Still', 'Yet', 'Already',
'Just', 'Only', 'Even', 'Also', 'Too', 'Either', 'Neither', 'Both', 'Each',
'Every', 'Any', 'Some', 'Few', 'Many', 'Much', 'Most', 'All', 'None', 'Several',
'Certain', 'Other', 'Another', 'Such', 'Same', 'Different', 'Various', 'Numerous',
'Countless', 'Endless', 'Limitless', 'Boundless', 'Infinite', 'Numerous',
# More common words found
'Mine', 'Yours', 'Ours', 'Theirs', 'His', 'Hers', 'Its', 'Whose',
'Than', 'Then', 'Thus', 'Hence', 'Since', 'Until', 'Unless', 'While',
'Hackathon', 'Hackathons', 'Access', 'Dynamics', 'Creation', 'Outside',
'Reach', 'Interface', 'Assembly', 'Ban', 'Bans', 'Market', 'Markets',
'Fucking', 'Shit', 'Damn', 'Hell', 'Crap', 'Bullshit', 'Asshole',
'Called', 'Built', 'Living', 'Print', 'Prints', 'Printed',
'Fox', 'Toptel', 'Buying', 'Selling', 'Trading', 'Shipping', 'Receiving', 'Sending',
'Watching', 'Listening', 'Reading', 'Writing', 'Speaking', 'Talking',
'Running', 'Walking', 'Driving', 'Flying', 'Swimming', 'Climbing',
'Eating', 'Drinking', 'Sleeping', 'Working', 'Playing', 'Studying',
'Following', 'Leading', 'Joining', 'Leaving', 'Staying', 'Moving',
'Helping', 'Hurting', 'Loving', 'Hating', 'Liking', 'Wanting', 'Needing',
'Knowing', 'Thinking', 'Feeling', 'Seeing', 'Hearing', 'Touching',
'Saying', 'Telling', 'Asking', 'Answering', 'Explaining', 'Describing',
'Showing', 'Hiding', 'Finding', 'Losing', 'Winning', 'Trying', 'Failing',
'Succeeding', 'Achieving', 'Reaching', 'Growing', 'Shrinking', 'Expanding',
'Changing', 'Remaining', 'Becoming', 'Being', 'Having', 'Doing', 'Making',
'Getting', 'Going', 'Coming', 'Leaving', 'Arriving', 'Departing',
'Starting', 'Beginning', 'Ending', 'Finishing', 'Completing', 'Stopping',
'Continuing', 'Resuming', 'Pausing', 'Waiting', 'Expecting', 'Hoping',
# More from latest output
'Onboarding', 'Field', 'Fields', 'Sugar', 'Gaming', 'Cursor', 'Doesn',
'She', 'Sir', 'Rocket', 'Walk', 'Walks', 'Cheers', 'Medical', 'Virtual',
'Production', 'Improving', 'Improvement', 'Talking', 'Recording',
'Episode', 'Episodes', 'Podcast', 'Podcasts', 'Video', 'Videos',
'Audio', 'Sound', 'Sounds', 'Voice', 'Voices', 'Speech', 'Speeches',
'Memory', 'Memories', 'Thought', 'Thoughts', 'Idea', 'Ideas',
'Mind', 'Brain', 'Head', 'Heart', 'Soul', 'Spirit', 'Body',
'World', 'Earth', 'Planet', 'Universe', 'Space', 'Sky', 'Sea', 'Ocean',
'Mountain', 'River', 'Lake', 'Forest', 'Desert', 'Island', 'Country',
'Nation', 'State', 'City', 'Town', 'Village', 'Street', 'Road', 'Path',
# More common words
'Come', 'Comes', 'Coming', 'Came', 'Broad', 'Star', 'Stars', 'From',
'Sell', 'Sells', 'Selling', 'Sold', 'Connect', 'Connects', 'Connected',
'Compared', 'Compare', 'Compares', 'Speedrun', 'Far', 'Near', 'Close',
'Wasn', 'Weren', 'Isn', 'Aren', 'Doesn', 'Don', 'Won', 'Can',
'Management', 'Manager', 'Managers', 'Prepares', 'Prepare', 'Prepared',
'Soma', 'Professional', 'Professionals', 'Expert', 'Experts',
'Founder', 'Founders', 'Investor', 'Investors', 'Engineer', 'Engineers',
'Designer', 'Designers', 'Developer', 'Developers', 'Analyst', 'Analysts',
'Director', 'Directors', 'Executive', 'Executives', 'Officer', 'Officers',
'President', 'Vice', 'Chief', 'Head', 'Lead', 'Senior', 'Junior',
'Assistant', 'Associate', 'Intern', 'Interns', 'Employee', 'Employees',
'Staff', 'Worker', 'Workers', 'Member', 'Members', 'Partner', 'Partners',
# More non-names
'Compensation', 'Sheet', 'Sheets', 'Similar', 'Despite', 'Per', 'Arab',
'Teach', 'Teaching', 'Copy', 'Copies', 'Essentials', 'Grind', 'Editing',
'Cut', 'Cuts', 'Paste', 'Pastes', 'Delete', 'Deletes', 'Save', 'Saves',
'Load', 'Loads', 'Send', 'Sends', 'Receive', 'Receives', 'Return', 'Returns',
'Enter', 'Enters', 'Exit', 'Exits', 'Leave', 'Leaves', 'Join', 'Joins',
'Sign', 'Signs', 'Signed', 'Login', 'Logout', 'Submit', 'Submits',
'Accept', 'Accepts', 'Reject', 'Rejects', 'Approve', 'Approves',
'Cancel', 'Cancels', 'Confirm', 'Confirms', 'Verify', 'Verifies',
'Check', 'Checks', 'Test', 'Tests', 'Review', 'Reviews', 'Rate', 'Rates',
'Vote', 'Votes', 'Pick', 'Picks', 'Choose', 'Chooses', 'Select', 'Selects',
'Switch', 'Switches', 'Toggle', 'Toggles', 'Flip', 'Flips', 'Turn', 'Turns',
'Push', 'Pushes', 'Pull', 'Pulls', 'Drag', 'Drags', 'Drop', 'Drops',
'Click', 'Clicks', 'Tap', 'Taps', 'Swipe', 'Swipes', 'Scroll', 'Scrolls',
'Zoom', 'Zooms', 'Pinch', 'Pinches', 'Rotate', 'Rotates', 'Shake', 'Shakes',
'Launched', 'Released', 'Published', 'Posted', 'Shared', 'Uploaded',
'Downloaded', 'Installed', 'Updated', 'Upgraded', 'Fixed', 'Solved',
'Resolved', 'Completed', 'Finished', 'Ended', 'Closed', 'Archived',
# Even more common words
'Wrong', 'Which', 'Without', 'Straight', 'Quest', 'Quests', 'Stay',
'Toptal', 'Selection', 'Engineering', 'Listen', 'Listens', 'Bam',
'Companies', 'Company', 'Explore', 'Explores', 'Exploring',
'Where', 'What', 'When', 'Why', 'Who', 'Whom', 'Whose', 'How',
'Under', 'Over', 'Above', 'Below', 'Between', 'Among', 'Within',
'Against', 'Toward', 'Towards', 'Into', 'Onto', 'Upon', 'Along',
'Across', 'Around', 'Behind', 'Beyond', 'Inside', 'Outside',
'Throughout', 'During', 'Before', 'After', 'Since', 'Until',
'Behind', 'Beside', 'Besides', 'Except', 'Despite', 'Unlike', 'Regarding',
# Final batch
'Experiences', 'Third', 'Did', 'Couldn', 'Lost', 'Roll', 'Rolls',
'Christ', 'Ram', 'Turbo', 'Notes', 'Note', 'Xiaomi', 'Huawei', 'Samsung',
'Sony', 'Lenovo', 'Dell', 'Asus', 'Acer', 'Hp', 'Ibm', 'Intel', 'Amd',
'Nvidia', 'Qualcomm', 'Arm', 'Cisco', 'Oracle', 'Sap', 'Adobe', 'Vmware',
'Second', 'Fourth', 'Fifth', 'Sixth', 'Seventh', 'Eighth', 'Ninth', 'Tenth',
'Double', 'Triple', 'Quadruple', 'Single', 'Multiple', 'Several', 'Various',
'Whole', 'Entire', 'Complete', 'Total', 'Overall', 'Average', 'Typical',
'Generated', 'Generates', 'Generate', 'Automated', 'Automate', 'Automates',
'Forbes', 'Fortune', 'Times', 'Post', 'Journal', 'News', 'Daily', 'Finalizes',
'Finalize', 'Finalized', 'Apart', 'Separate', 'Separated', 'Separates',
# More non-names from latest output
'Meetings', 'Weekly', 'Sparks', 'Immigration', 'Approval', 'Thousands',
'Mentioned', 'Mentions', 'Mention', 'Billion', 'Millions', 'Hundreds',
'Briefly', 'Specifically', 'Primarily', 'Particularly', 'Generally',
'Minutes', 'Seconds', 'Hours', 'Weeks', 'Months', 'Years', 'Decades',
'Briefly', 'Quickly', 'Slowly', 'Carefully', 'Correctly', 'Properly',
'Positively', 'Negatively', 'Successfully', 'Effectively', 'Efficiently',
'Approval', 'Approvals', 'Rejection', 'Rejections', 'Permission', 'Permissions',
'Schedule', 'Schedules', 'Scheduling', 'Calendar', 'Calendars', 'Agenda',
'Budget', 'Budgets', 'Revenue', 'Revenues', 'Profit', 'Profits', 'Loss', 'Losses',
'Expense', 'Expenses', 'Income', 'Incomes', 'Salary', 'Salaries', 'Wage', 'Wages',
'Sparks', 'Spark', 'Ignite', 'Ignites', 'Trigger', 'Triggers', 'Cause', 'Causes',
'Immigration', 'Immigrant', 'Immigrants', 'Migration', 'Migrate', 'Migrates',
'Thousands', 'Thousand', 'Hundreds', 'Hundred', 'Dozens', 'Dozen',
'Weekly', 'Monthly', 'Yearly', 'Daily', 'Hourly', 'Quarterly', 'Annual',
'Internship', 'Internships', 'Residency', 'Fellowship', 'Fellowships',
'Referral', 'Referrals', 'Reference', 'References', 'Recommendation',
'Regarding', 'Concerning', 'Relating', 'Pertaining', 'Involving',
'Further', 'Closer', 'Deeper', 'Higher', 'Lower', 'Better', 'Worse',
'Bigger', 'Smaller', 'Larger', 'Tinier', 'Wider', 'Narrower', 'Longer', 'Shorter',
'Faster', 'Slower', 'Stronger', 'Weaker', 'Harder', 'Easier', 'Simpler', 'Complexer',
'Retired', 'Originally', 'Cleaning', 'Arc', 'Obi', 'Originally', 'Basically',
'Essentially', 'Literally', 'Apparently', 'Obviously', 'Clearly', 'Simply',
'Properly', 'Correctly', 'Possibly', 'Probably', 'Certainly', 'Definitely',
'Actually', 'Really', 'Truly', 'Fully', 'Completely', 'Entirely', 'Totally',
'Precisely', 'Exactly', 'Approximately', 'Roughly', 'Nearly', 'Almost',
'Cleaned', 'Cleaning', 'Cleans', 'Clean', 'Retired', 'Retiring', 'Retires',
'Original', 'Originally', 'Originals', 'Arc', 'Arcs', 'Obi', 'Via', 'Per',
'Etc', 'Vs', 'Via', 'Aka', 'Ie', 'Eg', 'Re', 'Fyi', 'Asap', 'Eta', 'Rsvp'}
# Find capitalized words (3-12 chars - most names are in this range)
words = re.findall(r'\b([A-Z][a-z]{2,11})\b', text)
for word in words:
if word not in common_words and 3 <= len(word) <= 12:
names.add(word)
return list(names)
def extract_people_from_content(memories: List[dict], conversations: List[dict], user_variations: set = None) -> Dict[str, dict]:
"""Extract all unique people names from memories and conversations."""
from datetime import datetime, timedelta
people_dict = {}
user_variations = user_variations or set()
# Only include data from last 3 months
three_months_ago = datetime.now() - timedelta(days=90)
def is_recent(item):
"""Check if item is from the last 3 months."""
created = item.get("created_at") or item.get("started_at") or item.get("timestamp")
if not created:
return False # EXCLUDE if no date - be strict
try:
if isinstance(created, str):
# Parse ISO format - handle various formats
clean = created.replace('Z', '').replace('+00:00', '').split('.')[0]
created_dt = datetime.fromisoformat(clean)
elif isinstance(created, (int, float)):
created_dt = datetime.fromtimestamp(created)
else:
return False
return created_dt >= three_months_ago
except Exception as e:
logger.debug(f"Date parse error: {e} for {created}")
return False # EXCLUDE if parsing fails - be strict
# Filter to recent items
recent_memories = [m for m in memories if is_recent(m)]
recent_conversations = [c for c in conversations if is_recent(c)]
logger.info(f"Filtered to {len(recent_memories)}/{len(memories)} recent memories, {len(recent_conversations)}/{len(conversations)} recent conversations (last 3 months)")
# Extract from memories
for memory in recent_memories:
content = memory.get("content", "")
names = extract_names_from_text(content)
for name in names:
name_lower = name.lower()
if name_lower in user_variations:
continue
if name_lower not in people_dict:
people_dict[name_lower] = {
"id": hashlib.md5(name_lower.encode()).hexdigest()[:16],
"name": name,
"mention_count": 0,
"context_snippets": [] # Store what's said about them
}
people_dict[name_lower]["mention_count"] += 1
# Store context snippet (sentence containing the name)
if len(people_dict[name_lower]["context_snippets"]) < 20: # Limit to 20 snippets
# Find sentences containing name
sentences = content.replace('\n', '. ').split('.')
for sent in sentences:
if name in sent and len(sent.strip()) > 10 and len(sent) < 500:
snippet = sent.strip()[:300]
if snippet not in people_dict[name_lower]["context_snippets"]:
people_dict[name_lower]["context_snippets"].append(snippet)
# Extract from conversations
for conv in recent_conversations:
conv_names = set()
structured = conv.get("structured", {})
overview = structured.get("overview", "")
title = structured.get("title", "")
for text in [overview, title]:
names = extract_names_from_text(text)
for name in names:
name_lower = name.lower()
if name_lower not in user_variations:
conv_names.add((name_lower, name))
segments = conv.get("transcript_segments", [])
for segment in segments:
text = segment.get("text", "")
names = extract_names_from_text(text)
for name in names:
name_lower = name.lower()
if name_lower not in user_variations:
conv_names.add((name_lower, name))
for name_lower, name in conv_names:
if name_lower not in people_dict:
people_dict[name_lower] = {
"id": hashlib.md5(name_lower.encode()).hexdigest()[:16],
"name": name,
"mention_count": 0,
"context_snippets": []
}
people_dict[name_lower]["mention_count"] += 1
# Store overview as context
if overview and name in overview and len(people_dict[name_lower]["context_snippets"]) < 10:
people_dict[name_lower]["context_snippets"].append(overview[:200])
# Filter: require at least 10 mentions for reliability
filtered = {k: v for k, v in people_dict.items() if v["mention_count"] >= 10}
logger.info(f"Extracted {len(filtered)} people from content (min 5 mentions)")
return filtered
# ============== IQ CALCULATION ==============
def calculate_iq_with_ai(people_dict: dict) -> dict:
"""Use AI to analyze context and determine IQ scores for all people."""
if not OPENAI_API_KEY:
logger.warning("No OpenAI key - using random IQ scores")
return {k: calculate_iq_score_random(v) for k, v in people_dict.items()}