<?php
/**
 * Stop-word list for keyword extraction from lot titles + tags.
 *
 * Conservative: filter pure noise ("a", "the", "of", "by", …) and auction
 * boilerplate ("lot", "circa", "approx", "pair", …). Do NOT filter words
 * that look common but carry signal — "antique", "vintage", "rare", "fine",
 * "Victorian", etc. — those are legitimate buyer-interest indicators.
 *
 * Filterable via:
 *   apply_filters('af_keyword_stop_words', $list)
 */

if (!defined('ABSPATH')) exit;

if (!function_exists('af_stats_default_stop_words')) {
    function af_stats_default_stop_words() {
        $list = array(
            // English common words
            'a','an','the','and','or','but','of','in','on','at','to','for',
            'with','by','from','as','is','are','was','were','be','been','being',
            'this','that','these','those','it','its','his','her','their','our',
            'your','my','me','him','them','us','we','you','he','she','they',
            'who','which','what','whose','whom','where','when','why','how',
            'into','onto','over','under','about','above','below','after','before',
            'between','through','during','off','out','up','down','no','not','nor',
            'so','if','than','then','because','while','until','also','just','too',
            'very','only','own','same','such','any','all','some','each','few',
            'more','most','other','others','another','both','either','neither',
            'one','two','three','four','five','six','seven','eight','nine','ten',
            'i','am','do','does','did','have','has','had','having','can','could',
            'will','would','shall','should','may','might','must','need','dare',
            'oh','ah','uh','um',

            // Auction-specific noise
            'lot','lots','circa','approx','approximately','pair','set','group',
            'various','comprising','including','together','plus','etc','others',
            'similar','type','style','example','examples','quantity','qty',
            'collection','assorted','assortment','mixed','box','boxed','case','cased',
            'piece','pieces','part','parts','item','items','number','numbered',
            // Auction-generic descriptors that carry zero buyer signal.
            // Deliberately conservative: keep period/quality words like
            // 'antique', 'vintage', 'rare', 'fine' — those genuinely
            // distinguish antiquarian buyers from modern-collectibles
            // buyers. The IDF re-rank on wpdeploy handles borderline cases
            // automatically; this list only catches words that are auction
            // boilerplate everywhere ("good condition", "originally made by",
            // "marked", "household goods").
            'original','marked','accessories','decorative','household',
            'goods','made','condition',

            // BidSpirit category-tag concatenations. The platform stuffs
            // `wp_bp_meta_data.tags` with PascalCase category names that
            // arrive lowercased without separators ("uscollectibles",
            // "firearmsaccessoriesammunition"). They look like keywords
            // because they're single tokens but they're really categories
            // and they completely swamp the top-5 chips on sites that
            // forward them. Suppressed here; tags_json is still synced as
            // its own column for separate analysis.
            'uscollectibles','itcollectibles','dacollectibles',
            'usart','usdecor','usnumismatics','usmemorabilia','damemorabilia',
            'usdecorativearts','printsandmultiples','tradingcardssports',
            'musicalinstruments','porcelainceramics','sportsmemorabilia',
            'designerclothing','banksandvending','deskaccessories',
            'woaponsandarmor','zincletterpress','vintageclothing',
            'reichsbanknotes','nativeamerican','huntingfishing',
            'sofasloveseats','fireandrescue','billscurrency','booksandpaper',
            'promotionaladvertising','firearmsaccessoriesammunition',

            // Punctuation-style fragments produced by aggressive tokenization
            'cm','mm','in','ins','inch','inches','ft','foot','feet',
        );

        return apply_filters('af_keyword_stop_words', $list);
    }
}
