Projects
Tools
libphutil
0003-Unvendorize-porter-stemmer.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-Unvendorize-porter-stemmer.patch of Package libphutil (Revision 27)
Currently displaying revision
27
,
Show latest
From a4719b0a35679bf2e12f961acca5abdc344b84db Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> Date: Sun, 4 Dec 2016 11:32:09 +0100 Subject: [PATCH 3/5] Unvendorize porter-stemmer Correctly load CamSpiers\PorterStemmer\Porter --- src/search/PhutilSearchStemmer.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/search/PhutilSearchStemmer.php b/src/search/PhutilSearchStemmer.php index c4a8604..521709c 100644 --- a/src/search/PhutilSearchStemmer.php +++ b/src/search/PhutilSearchStemmer.php @@ -40,7 +40,7 @@ final class PhutilSearchStemmer } /** - * @phutil-external-symbol class Porter + * @phutil-external-symbol class CamSpiers\Porter */ private function applyStemmer($normalized_token) { // If the token has internal punctuation, handle it literally. This @@ -53,13 +53,11 @@ final class PhutilSearchStemmer static $loaded; if ($loaded === null) { - $root = dirname(phutil_get_library_root('phutil')); - require_once $root.'/externals/porter-stemmer/src/Porter.php'; + require_once 'CamSpiers/PorterStemmer/Porter.php'; $loaded = true; } - - $stem = Porter::stem($normalized_token); + $stem = CamSpiers\PorterStemmer\Porter::stem($normalized_token); // If the stem is too short, it won't be a candidate for indexing. These // tokens are also likely to be acronyms (like "DNS") rather than real -- 2.14.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.