Plugin Directory

Changeset 1260190


Ignore:
Timestamp:
10/06/2015 07:16:46 AM (10 years ago)
Author:
Studiofreya
Message:

bugfix

Location:
sf-generate-tags/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sf-generate-tags/trunk/sf-tags-filter-english.php

    r1239214 r1260190  
    1313        'and', 'any', 'anyone', 'anytime', 'are', 'around', 'aside', 'all', 'away',
    1414        'become', 'because', 'behind', 'before', 'between', 'but', 'com', 'common',
    15         'different', 'down', 'due', 'either', 'extra', 'ever', 'every',
     15        'different', 'down', 'due', 'either', 'etc', 'extra', 'ever', 'every',
    1616        'far', 'false', 'for', 'forever', 'from', 'further', 'full',
    1717        'here', 'hers', 'him', 'how', 'however',
     
    2020        'often', 'once', 'only', 'onto', 'org', 'other', 'others', 'our', 'ours', 'out', 'over', 'per', 'plenty', 'png', 'rather',
    2121        'same', 'since', 'she', 'someone', 'something', 'sure', 'such',
    22         'than', 'that', 'the', 'then', 'there', 'these', 'them', 'they', 'those', 'this', 'through', 'thus', 'too', 'together', 'true',
     22        'than', 'that', 'the', 'then', 'there', 'these', 'them', 'they', 'till', 'those', 'this', 'through', 'thus', 'too', 'together', 'true',
    2323        'under', 'unless', 'via',
    2424        'what', 'whatever', 'when', 'whenever', 'where', 'whether', 'within', 'without', 'whatever', 'which', 'while', 'whithin', 'who', 'whole', 'whose', 'why', 'with',
     
    3636        'very');
    3737       
    38     $adjectives = array('actual', 'authentic', 'avoid', 'bad', 'best', 'better', 'closed', 'cool', 'current',       'difficult',
     38    $adjectives = array('actual', 'authentic', 'avoid', 'bad', 'best', 'better', 'closed', 'cool', 'current', 'difficult',
    3939        'easier', 'easily', 'few', 'full', 'fun', 'good',
    4040        'great', 'huge', 'later', 'like', 'long', 'make', 'new', 'old', 'older', 'open',
     
    4848        'decide', 'delete', 'discuss', 'did', 'does', 'doing', 'done', 'edit', 'enjoy',
    4949        'fill', 'find', 'found', 'gather', 'gave', 'get', 'gets', 'give', 'gone', 'got', 'guess',
    50         'had', 'happen', 'has', 'have', 'helps', 'jump', 'keep', 'kept', 'let', 'like', 'look', 'loose',
     50        'had', 'happen', 'has', 'have', 'helps', 'jump', 'keep', 'kept', 'know', 'let', 'like', 'look', 'loose',
    5151        'made', 'make', 'may', 'mean', 'means', 'might', 'must', 'occur', 'own', 'paste', 'pay', 'pick', 'put', 'prefer', 'propose',    'read', 'receive', 'remember', 'run',
    5252        'say', 'see', 'select', 'send', 'set', 'should', 'sit', 'spend', 'start', 'stay', 'stop', 'take', 'tell', 'took', 'try',
     
    6363            || in_array( $word, $adjectives )
    6464            || in_array( $word, $verbs )
    65             || wordEndsWith($word, "al")
    66             || wordEndsWith($word, "able")
    67             || wordEndsWith($word, "ly")
    68             || wordEndsWith($word, "ed")
    69             || wordEndsWith($word, "'s")
    70             || wordEndsWith($word, "es")
    71             || wordEndsWith($word, "ing")
    72             || wordEndsWith($word, "est")
    73             || wordEndsWith($word, "ght")
    74             || wordEndsWith($word, "ugh")
    75             || wordEndsWith($word, "id")
    76             || wordEndsWith($word, "made")
    77             || wordEndsWith($word, "ier")
    78             || wordEndsWith($word, "self")
    79             || wordEndsWith($word, "ary")
    8065        )
    8166        {   
    8267            $toOutput = false;
    8368        }
     69       
     70        //check same word single and multiple instances
     71        if($toOutput == TRUE && wordEndsWith($word, "s")){
     72            foreach ( $input_array as $matchingWord )
     73            {
     74                $wordWithoutS = substr($word, 0, -1);
     75                   
     76                if(strcasecmp($wordWithoutS, $matchingWord) == 0)
     77                {
     78                    $toOutput = false;                 
     79                    break;
     80                }
     81            }
     82        }
    8483
    8584        if($toOutput == TRUE){
     
    135134            || in_array( $word, $adjectives )
    136135            || in_array( $word, $verbs )
    137             || wordEndsWith($word, "s")
    138136            || wordEndsWith($word, "en")
    139137            || wordEndsWith($word, "y")
    140             || wordEndsWith($word, "t")
     138            || wordEndsWith($word, "al")
     139            || wordEndsWith($word, "able")
     140            || wordEndsWith($word, "ly")
     141            || wordEndsWith($word, "ed")
     142            || wordEndsWith($word, "'s")
     143            || wordEndsWith($word, "es")
     144            || wordEndsWith($word, "ing")
     145            || wordEndsWith($word, "est")
     146            || wordEndsWith($word, "ugh")
     147            || wordEndsWith($word, "id")
     148            || wordEndsWith($word, "made")
     149            || wordEndsWith($word, "ier")
     150            || wordEndsWith($word, "self")
     151            || wordEndsWith($word, "ary")
    141152        )
    142153        {   
  • sf-generate-tags/trunk/sf-tags.php

    r1239214 r1260190  
    44 * Plugin URI: http://studiofreya.com
    55 * Description: This plugin autogenerates tags for your posts from attached images names and post text
    6  * Version: 1.3
     6 * Version: 1.3.1
    77 * Author: Studiofreya AS
    88 * Author URI: http://studiofreya.com
Note: See TracChangeset for help on using the changeset viewer.