Version Description
Download this release
Release Info
Developer | RobMarsh |
Plugin | Similar Posts – Best Related Posts Plugin for WordPress |
Version | 2.6.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.1.2 to 2.6.1.3
- languages/de/stemmer.php +4 -2
- languages/de/stemmer.php.bak +0 -315
- readme.txt +3 -1
- similar-posts-admin.php +1 -1
- similar-posts.php +2 -2
languages/de/stemmer.php
CHANGED
@@ -24,8 +24,10 @@
|
|
24 |
|
25 |
define("DE_STEMMER_VOKALE", "aeiouyäöü");
|
26 |
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
30 |
function _de_stemmer_split_text(&$text) {
|
31 |
// Split words from noise
|
24 |
|
25 |
define("DE_STEMMER_VOKALE", "aeiouyäöü");
|
26 |
|
27 |
+
if (function_exists('mb_detect_encoding')) {
|
28 |
+
$enc = mb_detect_encoding('a-zA-ZÄÖÜßäëïöüáéíóúè');
|
29 |
+
mb_internal_encoding($enc);
|
30 |
+
}
|
31 |
|
32 |
function _de_stemmer_split_text(&$text) {
|
33 |
// Split words from noise
|
languages/de/stemmer.php.bak
DELETED
@@ -1,315 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Adapted from a drupal module -- see details below
|
4 |
-
*/
|
5 |
-
|
6 |
-
/*
|
7 |
-
Content:
|
8 |
-
Drupal module to improve searching in german texts (Porter stemmer)
|
9 |
-
Algorithm based on http://snowball.tartarus.org/algorithms/german/stemmer.html
|
10 |
-
Author:
|
11 |
-
Reiner Miericke 10.10.2007
|
12 |
-
References:
|
13 |
-
Algorithm:
|
14 |
-
http://www.clef-campaign.org/workshop2002/WN/3.pdf
|
15 |
-
http://w3.ub.uni-konstanz.de/v13/volltexte/2003/996//pdf/scherer.pdf
|
16 |
-
http://kontext.fraunhofer.de/haenelt/kurs/Referate/Kowatschew_Lang/stemming.pdf
|
17 |
-
http://www.cis.uni-muenchen.de/people/Schulz/SeminarSoSe2001IR/FilzmayerMargetic/referat.html
|
18 |
-
http://www.ifi.unizh.ch/CL/broder/mue1/porter/stemming/node1.html
|
19 |
-
For lists of stopwords see
|
20 |
-
http://members.unine.ch/jacques.savoy/clef/index.html
|
21 |
-
Small parts were stolen from dutchstemmer.module
|
22 |
-
*/
|
23 |
-
|
24 |
-
|
25 |
-
define("DE_STEMMER_VOKALE", "aeiouyäöü");
|
26 |
-
|
27 |
-
$enc = mb_detect_encoding('a-zA-ZÄÖÜßäëïöüáéíóúè');
|
28 |
-
mb_internal_encoding($enc);
|
29 |
-
|
30 |
-
function _de_stemmer_split_text(&$text) {
|
31 |
-
// Split words from noise
|
32 |
-
return preg_split('/([^a-zA-ZÄÖÜßäëïöüáéíóúè]+)/u', $text, -1, PREG_SPLIT_NO_EMPTY);
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Implementation of hook_search_preprocess
|
38 |
-
*/
|
39 |
-
function de_stemmer_search_preprocess(&$text) {
|
40 |
-
// Split words from noise and remove apostrophes
|
41 |
-
$words = preg_split('/([^a-zA-ZÄÖÜßäëïöüáéíóúè]+)/u', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
|
42 |
-
|
43 |
-
// Process each word
|
44 |
-
$odd = true;
|
45 |
-
foreach ($words as $k => $word) {
|
46 |
-
if ($odd) {
|
47 |
-
$words[$k] = _de_stemmer_wortstamm($word);
|
48 |
-
}
|
49 |
-
$odd = !$odd;
|
50 |
-
}
|
51 |
-
|
52 |
-
// Put it all back together
|
53 |
-
return implode('', $words);
|
54 |
-
|
55 |
-
/* alte Version
|
56 |
-
$words = _de_stemmer_split_text($text);
|
57 |
-
|
58 |
-
// Process each word
|
59 |
-
foreach ($words as $k => $word) {
|
60 |
-
if (!_de_stemmer_stoppwort(strtolower($word))) {
|
61 |
-
$words[$k] = _de_stemmer_wortstamm($word);
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
// Put it all back together
|
66 |
-
return implode(' ', $words);
|
67 |
-
*/
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Implementation of hook_help().
|
73 |
-
*/
|
74 |
-
function de_stemmer_help($section = 'admin/help#search') {
|
75 |
-
switch ($section) {
|
76 |
-
case 'admin/modules#description':
|
77 |
-
return t('Implements a German stemming algorithm (Porter) to improve searching.');
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
|
82 |
-
/*
|
83 |
-
* Function gets as text (parameter) and splits the text into words.
|
84 |
-
* Then each word is stemmed and the word together with its stem is
|
85 |
-
* stored in an array (hash).
|
86 |
-
* As a result the hash is returned and can be used as a lookup table
|
87 |
-
* to identify words which transform to the same stem.
|
88 |
-
* For details please compare 'search.module-stem.patch'
|
89 |
-
*/
|
90 |
-
function de_stemmer_stem_list($text) {
|
91 |
-
// Split words from noise and remove apostrophes
|
92 |
-
$words = _de_stemmer_split_text($text);
|
93 |
-
|
94 |
-
$stem_list = array();
|
95 |
-
foreach ($words as $word) {
|
96 |
-
$stem_list[$word] = _de_stemmer_wortstamm($word);
|
97 |
-
}
|
98 |
-
return $stem_list;
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
-
function _de_stemmer_region_n($wort) {
|
103 |
-
$r = strcspn($wort, DE_STEMMER_VOKALE);
|
104 |
-
return $r + strspn($wort, DE_STEMMER_VOKALE, $r) + 1;
|
105 |
-
}
|
106 |
-
|
107 |
-
function de_stemmer_preprocess($wort) {
|
108 |
-
$wort = mb_strtolower($wort);
|
109 |
-
$wort = str_replace("ß", "ss", $wort);
|
110 |
-
// replace ß by ss, and put u and y between vowels into upper case
|
111 |
-
|
112 |
-
$wort = preg_replace( array( '/ß/',
|
113 |
-
'/(?<=['. DE_STEMMER_VOKALE .'])u(?=['. DE_STEMMER_VOKALE .'])/u',
|
114 |
-
'/(?<=['. DE_STEMMER_VOKALE .'])y(?=['. DE_STEMMER_VOKALE .'])/u'
|
115 |
-
),
|
116 |
-
array( 'ss', 'U', 'Y' ),
|
117 |
-
$wort
|
118 |
-
);
|
119 |
-
return $wort;
|
120 |
-
}
|
121 |
-
|
122 |
-
|
123 |
-
function _de_stemmer_postprocess($wort) {
|
124 |
-
$wort = mb_strtolower($wort);
|
125 |
-
|
126 |
-
if (!_de_stemmer_ausnahme($wort)) // check for exceptions
|
127 |
-
{
|
128 |
-
$wort = strtr($wort, array('ä' => 'a', 'á' => 'a',
|
129 |
-
'ë' => 'e', 'é' => 'e',
|
130 |
-
'ï' => 'i', 'í' => 'i',
|
131 |
-
'ö' => 'o', 'ó' => 'o',
|
132 |
-
'ü' => "u", 'ú' => 'u'
|
133 |
-
));
|
134 |
-
}
|
135 |
-
return $wort;
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
function _de_stemmer_wortstamm($wort) {
|
140 |
-
$stamm = de_stemmer_preprocess($wort);
|
141 |
-
|
142 |
-
/*
|
143 |
-
* R1 is the region after the first non-vowel following a vowel,
|
144 |
-
or is the null region at the end of the word if there is no such non-vowel.
|
145 |
-
* R2 is the region after the first non-vowel following a vowel in R1,
|
146 |
-
or is the null region at the end of the word if there is no such non-vowel.
|
147 |
-
*/
|
148 |
-
|
149 |
-
$l = strlen($stamm);
|
150 |
-
$r1 = _de_stemmer_region_n($stamm);
|
151 |
-
$r2 = $r1 == $l ? $r1 : $r1 + _de_stemmer_region_n(mb_substr($stamm, $r1));
|
152 |
-
// unshure about interpreting the following rule:
|
153 |
-
// "then R1 is ADJUSTED so that the region before it contains at least 3 letters"
|
154 |
-
if ($r1 < 3) {
|
155 |
-
$r1 = 3;
|
156 |
-
}
|
157 |
-
|
158 |
-
/* Step 1
|
159 |
-
Search for the longest among the following suffixes,
|
160 |
-
(a) e em en ern er es
|
161 |
-
(b) s (preceded by a valid s-ending)
|
162 |
-
and delete if in R1.
|
163 |
-
(Of course the letter of the valid s-ending is not necessarily in R1)
|
164 |
-
*/
|
165 |
-
|
166 |
-
if (preg_match('/(e|em|en|ern|er|es)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
167 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
168 |
-
}
|
169 |
-
elseif (preg_match('/(?<=(b|d|f|g|h|k|l|m|n|r|t))s$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
170 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
/*
|
175 |
-
Step 2
|
176 |
-
Search for the longest among the following suffixes,
|
177 |
-
(a) en er est
|
178 |
-
(b) st (preceded by a valid st-ending, itself preceded by at least 3 letters)
|
179 |
-
and delete if in R1.
|
180 |
-
*/
|
181 |
-
|
182 |
-
if (preg_match('/(en|er|est)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
183 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
184 |
-
}
|
185 |
-
elseif (preg_match('/(?<=(b|d|f|g|h|k|l|m|n|t))st$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
186 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
187 |
-
}
|
188 |
-
|
189 |
-
|
190 |
-
/*
|
191 |
-
Step 3: d-suffixes ( see http://snowball.tartarus.org/texts/glossary.html )
|
192 |
-
Search for the longest among the following suffixes, and perform the action indicated.
|
193 |
-
end ung
|
194 |
-
delete if in R2
|
195 |
-
if preceded by ig, delete if in R2 and not preceded by e
|
196 |
-
ig ik isch
|
197 |
-
delete if in R2 and not preceded by e
|
198 |
-
lich heit
|
199 |
-
delete if in R2
|
200 |
-
if preceded by er or en, delete if in R1
|
201 |
-
keit
|
202 |
-
delete if in R2
|
203 |
-
if preceded by lich or ig, delete if in R2
|
204 |
-
^ means R1 ?
|
205 |
-
*/
|
206 |
-
|
207 |
-
if (preg_match('/(?<=eig)(end|ung)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) {
|
208 |
-
;
|
209 |
-
}
|
210 |
-
elseif (preg_match('/(end|ung)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) {
|
211 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
212 |
-
}
|
213 |
-
elseif (preg_match('/(?<![e])(ig|ik|isch)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) {
|
214 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
215 |
-
}
|
216 |
-
elseif (preg_match('/(?<=(er|en))(lich|heit)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
217 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
218 |
-
}
|
219 |
-
elseif (preg_match('/(lich|heit)$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) {
|
220 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
221 |
-
}
|
222 |
-
elseif (preg_match('/(?<=lich)keit$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
223 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
224 |
-
}
|
225 |
-
elseif (preg_match('/(?<=ig)keit$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r1)) {
|
226 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
227 |
-
}
|
228 |
-
elseif (preg_match('/keit$/u', $stamm, $hits, PREG_OFFSET_CAPTURE, $r2)) {
|
229 |
-
$stamm = mb_substr($stamm, 0, $hits[0][1]);
|
230 |
-
}
|
231 |
-
|
232 |
-
|
233 |
-
/* Was ist mit
|
234 |
-
chen, lein, bar, schaft, ... ?
|
235 |
-
*/
|
236 |
-
return _de_stemmer_postprocess($stamm);
|
237 |
-
}
|
238 |
-
|
239 |
-
|
240 |
-
function _de_stemmer_stoppwort($wort) {
|
241 |
-
|
242 |
-
static $stoppworte = array(
|
243 |
-
'ab', 'aber', 'aber', 'ach', 'acht', 'achte', 'achten', 'achter', 'achtes', 'ag', 'alle', 'allein', 'allem', 'allen', 'aller', 'allerdings', 'alles', 'allgemeinen', 'als', 'als', 'also', 'am', 'an', 'andere', 'anderen', 'andern', 'anders', 'au', 'auch', 'auch', 'auf', 'aus', 'ausser', 'außer', 'ausserdem', 'außerdem',
|
244 |
-
'bald', 'bei', 'beide', 'beiden', 'beim', 'bekannt', 'bereits', 'besonders', 'besser', 'besten', 'bin', 'bis', 'bisher', 'bist',
|
245 |
-
'da', 'dabei', 'dadurch', 'dafür', 'dagegen', 'daher', 'dahin', 'dahinter', 'damals', 'damit', 'danach', 'daneben', 'dank', 'dann', 'daran', 'darauf', 'daraus', 'darf', 'darfst', 'darin', 'darüber', 'darum', 'darunter', 'das', 'das', 'dasein', 'daselbst', 'dass', 'daß', 'dasselbe', 'davon', 'davor', 'dazu', 'dazwischen', 'dein', 'deine', 'deinem', 'deiner', 'dem', 'dementsprechend', 'demgegenüber', 'demgemäss', 'demgemäß', 'demselben', 'demzufolge', 'den', 'denen', 'denn', 'denn', 'denselben', 'der', 'deren', 'derjenige', 'derjenigen', 'dermassen', 'dermaßen', 'derselbe', 'derselben', 'des', 'deshalb', 'desselben', 'dessen', 'deswegen', 'd.h', 'dich', 'die', 'diejenige', 'diejenigen', 'dies', 'diese', 'dieselbe', 'dieselben', 'diesem', 'diesen', 'dieser', 'dieses', 'dir', 'doch', 'dort', 'drei', 'drin', 'dritte', 'dritten', 'dritter', 'drittes', 'du', 'durch', 'durchaus',
|
246 |
-
'eben', 'ebenso', 'eigen', 'eigene', 'eigenen', 'eigener', 'eigenes', 'ein', 'einander', 'eine', 'einem', 'einen', 'einer', 'eines', 'einige', 'einigen', 'einiger', 'einiges', 'einmal', 'einmal', 'eins', 'elf', 'en', 'ende', 'endlich', 'entweder', 'entweder', 'er', 'ernst', 'erst', 'erste', 'ersten', 'erster', 'erstes', 'es', 'etwa', 'etwas', 'euch',
|
247 |
-
'früher', 'fünf', 'fünfte', 'fünften', 'fünfter', 'fünftes', 'für',
|
248 |
-
'gab', 'ganz', 'ganze', 'ganzen', 'ganzer', 'ganzes', 'gar', 'gedurft', 'gegen', 'gegenüber', 'gehabt', 'gehen', 'geht', 'gekannt', 'gekonnt', 'gemacht', 'gemocht', 'gemusst', 'genug', 'gerade', 'gern', 'gesagt', 'gesagt', 'geschweige', 'gewesen', 'gewollt', 'geworden', 'gibt', 'ging', 'gleich', 'gott', 'gross', 'groß', 'grosse', 'große', 'grossen', 'großen', 'grosser', 'großer', 'grosses', 'großes', 'gut', 'gute', 'guter', 'gutes',
|
249 |
-
'habe', 'haben', 'habt', 'hast', 'hat', 'hatte', 'hätte', 'hatten', 'hätten', 'heisst', 'her', 'heute', 'hier', 'hin', 'hinter', 'hoch',
|
250 |
-
'ich', 'ihm', 'ihn', 'ihnen', 'ihr', 'ihre', 'ihrem', 'ihren', 'ihrer', 'ihres', 'im', 'im', 'immer', 'in', 'in', 'indem', 'infolgedessen', 'ins', 'irgend', 'ist',
|
251 |
-
'ja', 'ja', 'jahr', 'jahre', 'jahren', 'je', 'jede', 'jedem', 'jeden', 'jeder', 'jedermann', 'jedermanns', 'jedoch', 'jemand', 'jemandem', 'jemanden', 'jene', 'jenem', 'jenen', 'jener', 'jenes', 'jetzt',
|
252 |
-
'kam', 'kann', 'kannst', 'kaum', 'kein', 'keine', 'keinem', 'keinen', 'keiner', 'kleine', 'kleinen', 'kleiner', 'kleines', 'kommen', 'kommt', 'können', 'könnt', 'konnte', 'könnte', 'konnten', 'kurz',
|
253 |
-
'lang', 'lange', 'lange', 'leicht', 'leide', 'lieber', 'los',
|
254 |
-
'machen', 'macht', 'machte', 'mag', 'magst', 'mahn', 'man', 'manche', 'manchem', 'manchen', 'mancher', 'manches', 'mann', 'mehr', 'mein', 'meine', 'meinem', 'meinen', 'meiner', 'meines', 'mich', 'mir', 'mit', 'mittel', 'mochte', 'möchte', 'mochten', 'mögen', 'möglich', 'mögt', 'morgen', 'muss', 'muß', 'müssen', 'musst', 'müsst', 'musste', 'mussten',
|
255 |
-
'na', 'nach', 'nachdem', 'nahm', 'natürlich', 'neben', 'nein', 'neue', 'neuen', 'neun', 'neunte', 'neunten', 'neunter', 'neuntes', 'nicht', 'nicht', 'nichts', 'nie', 'niemand', 'niemandem', 'niemanden', 'noch', 'nun', 'nun', 'nur',
|
256 |
-
'ob', 'oben', 'oder', 'oder', 'offen', 'oft', 'oft', 'ohne',
|
257 |
-
'recht', 'rechte', 'rechten', 'rechter', 'rechtes', 'richtig', 'rund',
|
258 |
-
'sa', 'sache', 'sagt', 'sagte', 'sah', 'satt', 'schon', 'sechs', 'sechste', 'sechsten', 'sechster', 'sechstes', 'sehr', 'sei', 'sei', 'seid', 'seien', 'sein', 'seine', 'seinem', 'seinen', 'seiner', 'seines', 'seit', 'seitdem', 'selbst', 'selbst', 'sich', 'sie', 'sieben', 'siebente', 'siebenten', 'siebenter', 'siebentes', 'sind', 'so', 'solang', 'solche', 'solchem', 'solchen', 'solcher', 'solches', 'soll', 'sollen', 'sollte', 'sollten', 'sondern', 'sonst', 'sowie', 'später', 'statt',
|
259 |
-
'tat', 'teil', 'tel', 'tritt', 'trotzdem', 'tun',
|
260 |
-
'über', 'überhaupt', 'übrigens', 'uhr', 'um', 'und', 'und?', 'uns', 'unser', 'unsere', 'unserer', 'unter',
|
261 |
-
'vergangenen', 'viel', 'viele', 'vielem', 'vielen', 'vielleicht', 'vier', 'vierte', 'vierten', 'vierter', 'viertes', 'vom', 'von', 'vor',
|
262 |
-
'wahr?', 'während', 'währenddem', 'währenddessen', 'wann', 'war', 'wäre', 'waren', 'wart', 'warum', 'was', 'wegen', 'weil', 'weit', 'weiter', 'weitere', 'weiteren', 'weiteres', 'welche', 'welchem', 'welchen', 'welcher', 'welches', 'wem', 'wen', 'wenig', 'wenig', 'wenige', 'weniger', 'weniges', 'wenigstens', 'wenn', 'wenn', 'wer', 'werde', 'werden', 'werdet', 'wessen', 'wie', 'wie', 'wieder', 'will', 'willst', 'wir', 'wird', 'wirklich', 'wirst', 'wo', 'wohl', 'wollen', 'wollt', 'wollte', 'wollten', 'worden', 'wurde', 'würde', 'wurden', 'würden',
|
263 |
-
'z.b', 'zehn', 'zehnte', 'zehnten', 'zehnter', 'zehntes', 'zeit', 'zu', 'zuerst', 'zugleich', 'zum', 'zum', 'zunächst', 'zur', 'zurück', 'zusammen', 'zwanzig', 'zwar', 'zwar', 'zwei', 'zweite', 'zweiten', 'zweiter', 'zweites', 'zwischen', 'zwölf'
|
264 |
-
);
|
265 |
-
|
266 |
-
return in_array($wort, $stoppworte);
|
267 |
-
}
|
268 |
-
|
269 |
-
|
270 |
-
/*
|
271 |
-
first try to set up a list of exceptions
|
272 |
-
*/
|
273 |
-
function _de_stemmer_ausnahme(&$wort)
|
274 |
-
{ static $de_stemmer_ausnahmen = array (
|
275 |
-
'schön' => 'schön', // !schon
|
276 |
-
'blüt' => 'blüt', // Blüte (NICHT Blut)
|
277 |
-
'kannt' => 'kenn',
|
278 |
-
'küch' => 'küch', // Küchen (NICHT Kuchen)
|
279 |
-
'mög' => 'mög',
|
280 |
-
'mocht' => 'mög',
|
281 |
-
'mag' => 'mög',
|
282 |
-
'ging' => 'geh',
|
283 |
-
'lief' => 'lauf',
|
284 |
-
'änd' => 'änd' // ändern (NICHT andern)
|
285 |
-
);
|
286 |
-
|
287 |
-
//return FALSE;
|
288 |
-
if ( array_key_exists($wort, $de_stemmer_ausnahmen) )
|
289 |
-
{ $wort = $de_stemmer_ausnahmen[$wort];
|
290 |
-
return TRUE;
|
291 |
-
}
|
292 |
-
else
|
293 |
-
return FALSE;
|
294 |
-
}
|
295 |
-
|
296 |
-
/*
|
297 |
-
Stem caching added by Rob Marsh, SJ
|
298 |
-
http://rmarsh.com
|
299 |
-
*/
|
300 |
-
|
301 |
-
$StemCache = array();
|
302 |
-
|
303 |
-
function stem($word) {
|
304 |
-
global $StemCache;
|
305 |
-
if (!isset($StemCache[$word])) {
|
306 |
-
$stemmedword = _de_stemmer_wortstamm($word);
|
307 |
-
$StemCache[$word] = $stemmedword;
|
308 |
-
}
|
309 |
-
else {
|
310 |
-
$stemmedword = $StemCache[$word] ;
|
311 |
-
}
|
312 |
-
return $stemmedword;
|
313 |
-
}
|
314 |
-
|
315 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://rmarsh.com/donate/similar-posts/
|
|
4 |
Tags: posts, related, similar, related posts, similar posts, tags, post-plugins
|
5 |
Requires at least: 1.5
|
6 |
Tested up to: 2.6.1
|
7 |
-
Stable tag: 2.6.1.
|
8 |
Displays a list of posts similar to the current one based on content, title and/or tags.
|
9 |
|
10 |
== Description ==
|
@@ -31,6 +31,8 @@ This plugin **requires** the latest version of the *Post-Plugin Library:* [downl
|
|
31 |
|
32 |
== Version History ==
|
33 |
|
|
|
|
|
34 |
* 2.6.1.2
|
35 |
* fix - german language stemmer file now in utf8
|
36 |
* 2.6.1.1
|
4 |
Tags: posts, related, similar, related posts, similar posts, tags, post-plugins
|
5 |
Requires at least: 1.5
|
6 |
Tested up to: 2.6.1
|
7 |
+
Stable tag: 2.6.1.3
|
8 |
Displays a list of posts similar to the current one based on content, title and/or tags.
|
9 |
|
10 |
== Description ==
|
31 |
|
32 |
== Version History ==
|
33 |
|
34 |
+
* 2.6.1.3
|
35 |
+
* fix - german language stemmer was crashing if mb_string fucntions not available
|
36 |
* 2.6.1.2
|
37 |
* fix - german language stemmer file now in utf8
|
38 |
* 2.6.1.1
|
similar-posts-admin.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
// Admin stuff for Similar Posts Plugin, Version 2.6.1.
|
4 |
|
5 |
function similar_posts_option_menu() {
|
6 |
add_options_page(__('Similar Posts Options', 'similar_posts'), __('Similar Posts', 'similar_posts'), 8, 'similar-posts', 'similar_posts_options_page');
|
1 |
<?php
|
2 |
|
3 |
+
// Admin stuff for Similar Posts Plugin, Version 2.6.1.3
|
4 |
|
5 |
function similar_posts_option_menu() {
|
6 |
add_options_page(__('Similar Posts Options', 'similar_posts'), __('Similar Posts', 'similar_posts'), 8, 'similar-posts', 'similar_posts_options_page');
|
similar-posts.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name:Similar Posts
|
4 |
Plugin URI: http://rmarsh.com/plugins/similar-posts/
|
5 |
Description: Displays a <a href="options-general.php?page=similar-posts.php">highly configurable</a> list of related posts. Similarity can be based on any combination of word usage in the content, title, or tags. Don't be disturbed if it takes a few moments to complete the installation -- the plugin is indexing your posts. <a href="http://rmarsh.com/plugins/post-options/">Instructions and help online</a>. Requires the latest version of the <a href="http://wordpress.org/extend/plugins/post-plugin-library/">Post-Plugin Library</a> to be installed.
|
6 |
-
Version: 2.6.1.
|
7 |
Author: Rob Marsh, SJ
|
8 |
Author URI: http://rmarsh.com/
|
9 |
*/
|
@@ -22,7 +22,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22 |
GNU General Public License for more details: http://www.gnu.org/licenses/gpl.txt
|
23 |
*/
|
24 |
|
25 |
-
$similar_posts_version = $similar_posts_feed_version= '2.6.1.
|
26 |
|
27 |
/*
|
28 |
Template Tag: Displays the posts most similar to the current post.
|
3 |
Plugin Name:Similar Posts
|
4 |
Plugin URI: http://rmarsh.com/plugins/similar-posts/
|
5 |
Description: Displays a <a href="options-general.php?page=similar-posts.php">highly configurable</a> list of related posts. Similarity can be based on any combination of word usage in the content, title, or tags. Don't be disturbed if it takes a few moments to complete the installation -- the plugin is indexing your posts. <a href="http://rmarsh.com/plugins/post-options/">Instructions and help online</a>. Requires the latest version of the <a href="http://wordpress.org/extend/plugins/post-plugin-library/">Post-Plugin Library</a> to be installed.
|
6 |
+
Version: 2.6.1.3
|
7 |
Author: Rob Marsh, SJ
|
8 |
Author URI: http://rmarsh.com/
|
9 |
*/
|
22 |
GNU General Public License for more details: http://www.gnu.org/licenses/gpl.txt
|
23 |
*/
|
24 |
|
25 |
+
$similar_posts_version = $similar_posts_feed_version= '2.6.1.3';
|
26 |
|
27 |
/*
|
28 |
Template Tag: Displays the posts most similar to the current post.
|