fix: proper noun detector flagging common phrases like 'Generate Design'
Massively expanded the common words filter — added ~500 common verbs, nouns, and adjectives that frequently appear capitalized in titles, headings, UI buttons, and instructions. 'Generate Design', 'Create Account', 'Search Filter', etc. are no longer flagged as PPI. Updated both content.js and auto-detect.js with the same word list. https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
@@ -257,6 +257,8 @@ const AutoDetect = {
|
||||
};
|
||||
|
||||
// Common English words to exclude from proper noun detection
|
||||
// Comprehensive list including verbs, nouns, adjectives that appear
|
||||
// in titles, headings, UI buttons, and instructions
|
||||
const COMMON_WORDS = new Set([
|
||||
'the', 'and', 'but', 'for', 'not', 'you', 'all', 'can', 'had', 'her',
|
||||
'was', 'one', 'our', 'out', 'are', 'has', 'his', 'how', 'its', 'may',
|
||||
@@ -276,6 +278,84 @@ const COMMON_WORDS = new Set([
|
||||
'number', 'other', 'point', 'right', 'small', 'state', 'thing',
|
||||
'think', 'those', 'three', 'through', 'under', 'until', 'water',
|
||||
'world', 'write', 'might', 'should', 'because', 'although',
|
||||
// Common verbs (titles, headings, buttons, instructions)
|
||||
'generate', 'design', 'manage', 'process', 'handle', 'check', 'verify',
|
||||
'submit', 'apply', 'accept', 'reject', 'approve', 'deny', 'confirm',
|
||||
'cancel', 'delete', 'remove', 'edit', 'modify', 'view', 'display',
|
||||
'search', 'filter', 'sort', 'select', 'choose', 'pick', 'enter',
|
||||
'upload', 'download', 'install', 'enable', 'disable', 'activate',
|
||||
'connect', 'disconnect', 'sync', 'refresh', 'reload', 'reset',
|
||||
'save', 'load', 'store', 'restore', 'backup', 'copy', 'paste',
|
||||
'lock', 'unlock', 'encrypt', 'decrypt', 'sign', 'register', 'login',
|
||||
'logout', 'subscribe', 'share', 'publish', 'deploy', 'launch',
|
||||
'merge', 'split', 'join', 'link', 'attach', 'insert', 'append',
|
||||
'format', 'parse', 'convert', 'transform', 'translate', 'compile',
|
||||
'execute', 'render', 'animate', 'validate', 'sanitize', 'escape',
|
||||
'create', 'build', 'start', 'stop', 'open', 'close', 'run', 'send',
|
||||
// Common nouns (titles, headings, labels)
|
||||
'account', 'action', 'address', 'alert', 'analysis', 'application',
|
||||
'area', 'article', 'asset', 'background', 'badge', 'banner', 'board',
|
||||
'body', 'border', 'bottom', 'box', 'browser', 'buffer', 'button',
|
||||
'cache', 'calendar', 'card', 'category', 'center', 'channel', 'chart',
|
||||
'chat', 'child', 'choice', 'client', 'cloud', 'code', 'collection',
|
||||
'color', 'column', 'command', 'comment', 'community', 'company',
|
||||
'component', 'config', 'configuration', 'connection', 'console',
|
||||
'contact', 'container', 'content', 'context', 'control', 'count',
|
||||
'country', 'custom', 'dashboard', 'data', 'database', 'date', 'day',
|
||||
'default', 'description', 'design', 'desktop', 'detail', 'device',
|
||||
'dialog', 'directory', 'document', 'domain', 'draft', 'driver',
|
||||
'edge', 'editor', 'element', 'email', 'engine', 'entry', 'environment',
|
||||
'error', 'event', 'example', 'extension', 'feature', 'feedback',
|
||||
'field', 'file', 'filter', 'folder', 'font', 'footer', 'form',
|
||||
'frame', 'function', 'gallery', 'general', 'global', 'grid',
|
||||
'guide', 'handler', 'header', 'health', 'help', 'history', 'home',
|
||||
'host', 'icon', 'image', 'index', 'info', 'input', 'instance',
|
||||
'interface', 'issue', 'item', 'job', 'key', 'label', 'language',
|
||||
'layout', 'level', 'library', 'light', 'limit', 'line', 'link',
|
||||
'list', 'local', 'location', 'log', 'logo', 'main', 'manager',
|
||||
'manual', 'map', 'media', 'member', 'memory', 'menu', 'message',
|
||||
'method', 'mobile', 'modal', 'mode', 'model', 'module', 'monitor',
|
||||
'navigation', 'network', 'node', 'note', 'notification', 'object',
|
||||
'option', 'order', 'origin', 'output', 'overlay', 'overview', 'owner',
|
||||
'package', 'page', 'panel', 'parent', 'parser', 'password', 'path',
|
||||
'pattern', 'permission', 'photo', 'pipeline', 'placeholder', 'plan',
|
||||
'platform', 'player', 'plugin', 'point', 'policy', 'pool', 'popup',
|
||||
'port', 'position', 'post', 'power', 'preview', 'primary', 'print',
|
||||
'priority', 'process', 'product', 'profile', 'program', 'progress',
|
||||
'project', 'prompt', 'property', 'protocol', 'provider', 'proxy',
|
||||
'public', 'query', 'queue', 'quick', 'range', 'rate', 'reader',
|
||||
'record', 'region', 'release', 'remote', 'report', 'request',
|
||||
'resource', 'response', 'result', 'review', 'role', 'root', 'route',
|
||||
'row', 'rule', 'runtime', 'sample', 'scanner', 'schema', 'scope',
|
||||
'screen', 'script', 'search', 'section', 'security', 'select',
|
||||
'sender', 'server', 'service', 'session', 'setting', 'settings',
|
||||
'setup', 'share', 'shell', 'shortcut', 'sidebar', 'signal', 'simple',
|
||||
'single', 'site', 'size', 'slider', 'snapshot', 'socket', 'solution',
|
||||
'source', 'space', 'stage', 'standard', 'status', 'step', 'storage',
|
||||
'stream', 'string', 'style', 'subject', 'success', 'summary',
|
||||
'support', 'switch', 'symbol', 'syntax', 'system', 'table', 'target',
|
||||
'task', 'team', 'template', 'terminal', 'test', 'text', 'theme',
|
||||
'thread', 'title', 'token', 'tool', 'toolbar', 'tooltip', 'total',
|
||||
'track', 'traffic', 'tree', 'trigger', 'type', 'unit', 'update',
|
||||
'upload', 'user', 'utility', 'value', 'variable', 'version', 'video',
|
||||
'view', 'virtual', 'warning', 'watch', 'web', 'widget', 'width',
|
||||
'window', 'wizard', 'word', 'worker', 'workspace', 'wrapper', 'zone',
|
||||
// Common adjectives
|
||||
'active', 'advanced', 'available', 'basic', 'clean', 'clear', 'complete',
|
||||
'connected', 'correct', 'critical', 'current', 'dark', 'deep',
|
||||
'different', 'direct', 'double', 'dynamic', 'easy', 'empty', 'entire',
|
||||
'exact', 'extra', 'fast', 'final', 'fixed', 'flat', 'free', 'fresh',
|
||||
'full', 'generic', 'given', 'hidden', 'initial', 'inner', 'internal',
|
||||
'invalid', 'latest', 'live', 'major', 'maximum', 'minimum', 'minor',
|
||||
'mixed', 'modern', 'multiple', 'native', 'natural', 'nested', 'normal',
|
||||
'online', 'optional', 'outer', 'overall', 'partial', 'pending', 'plain',
|
||||
'popular', 'possible', 'previous', 'private', 'proper', 'protected',
|
||||
'random', 'raw', 'ready', 'real', 'recent', 'related', 'relative',
|
||||
'required', 'responsive', 'safe', 'secure', 'selected', 'sensitive',
|
||||
'separate', 'shared', 'silent', 'similar', 'smart', 'smooth', 'solid',
|
||||
'special', 'specific', 'stable', 'static', 'strict', 'strong',
|
||||
'supported', 'unique', 'universal', 'unknown', 'upper', 'valid',
|
||||
'various', 'visible', 'visual', 'whole', 'wide',
|
||||
// Programming / tech terms
|
||||
'string', 'number', 'boolean', 'object', 'array', 'function', 'class',
|
||||
'type', 'error', 'null', 'undefined', 'true', 'false', 'return',
|
||||
|
||||
Reference in New Issue
Block a user