From 622d2fc23d1ea4ec93a3d45315828134474cc85b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 15 May 2018 11:09:56 +0200 Subject: [PATCH] Remove unused static resources. Stop words are not use anymore since a long time now that indexing has been moved to libzim. No need to embedded them in kiwix-lib. --- src/searcher.cpp | 2 +- static/meson.build | 29 +- static/resources_list.txt | 1 + static/resources_list_ctpp2.txt | 4 - static/resources_list_noctpp2.txt | 3 - static/stopwords/en | 671 ------------------------------ static/stopwords/fra | 124 ------ static/stopwords/he | 87 ---- 8 files changed, 15 insertions(+), 906 deletions(-) create mode 100644 static/resources_list.txt delete mode 100644 static/resources_list_ctpp2.txt delete mode 100644 static/resources_list_noctpp2.txt delete mode 100644 static/stopwords/en delete mode 100644 static/stopwords/fra delete mode 100644 static/stopwords/he diff --git a/src/searcher.cpp b/src/searcher.cpp index 4fd430eba..e60205b77 100644 --- a/src/searcher.cpp +++ b/src/searcher.cpp @@ -21,7 +21,6 @@ #include #include "searcher.h" -#include "kiwixlib-resources.h" #include "reader.h" #include "xapianSearcher.h" @@ -32,6 +31,7 @@ #include #include #include "ctpp2/CTPP2VMStringLoader.hpp" +#include "kiwixlib-resources.h" using namespace CTPP; #endif diff --git a/static/meson.build b/static/meson.build index 2b8b29393..2c251020b 100644 --- a/static/meson.build +++ b/static/meson.build @@ -7,21 +7,18 @@ if ctpp2c.found() input: 'results.tmpl', output: 'results.ct2', command: [intermediate_ctpp2c, ctpp2c, '@INPUT@', '@OUTPUT@'] - ) - resources_list = 'resources_list_ctpp2.txt' - resources_depends = [search_result_template] + ) + resources_list = 'resources_list_ctpp2.txt' + lib_resources = custom_target('resources', + input: 'resources_list.txt', + output: ['kiwixlib-resources.cpp', 'kiwixlib-resources.h'], + command:[res_compiler, + '--cxxfile', '@OUTPUT0@', + '--hfile', '@OUTPUT1@', + '--source_dir', '@OUTDIR@', + '@INPUT@'], + depends: [search_result_template] + ) else - resources_list = 'resources_list_noctpp2.txt' - resources_depends = [] + lib_resources = [] endif - -lib_resources = custom_target('resources', - input: resources_list, - output: ['kiwixlib-resources.cpp', 'kiwixlib-resources.h'], - command:[res_compiler, - '--cxxfile', '@OUTPUT0@', - '--hfile', '@OUTPUT1@', - '--source_dir', '@OUTDIR@', - '@INPUT@'], - depends: resources_depends -) diff --git a/static/resources_list.txt b/static/resources_list.txt new file mode 100644 index 000000000..9c165fa1e --- /dev/null +++ b/static/resources_list.txt @@ -0,0 +1 @@ +results.ct2 diff --git a/static/resources_list_ctpp2.txt b/static/resources_list_ctpp2.txt deleted file mode 100644 index 08b63fc79..000000000 --- a/static/resources_list_ctpp2.txt +++ /dev/null @@ -1,4 +0,0 @@ -results.ct2 -stopwords/en -stopwords/he -stopwords/fra diff --git a/static/resources_list_noctpp2.txt b/static/resources_list_noctpp2.txt deleted file mode 100644 index 7851cdb8f..000000000 --- a/static/resources_list_noctpp2.txt +++ /dev/null @@ -1,3 +0,0 @@ -stopwords/en -stopwords/he -stopwords/fra diff --git a/static/stopwords/en b/static/stopwords/en deleted file mode 100644 index d6dd643d8..000000000 --- a/static/stopwords/en +++ /dev/null @@ -1,671 +0,0 @@ -a -able -about -above -abst -accordance -according -accordingly -across -act -actually -added -adj -adopted -affected -affecting -affects -after -afterwards -again -against -ah -all -almost -alone -along -already -also -although -always -am -among -amongst -an -and -announce -another -any -anybody -anyhow -anymore -anyone -anything -anyway -anyways -anywhere -apparently -approximately -are -aren -arent -arise -around -as -aside -ask -asking -at -auth -available -away -awfully -b -back -be -became -because -become -becomes -becoming -been -before -beforehand -begin -beginning -beginnings -begins -behind -being -believe -below -beside -besides -between -beyond -biol -both -brief -briefly -but -by -c -ca -came -can -cannot -can't -cause -causes -certain -certainly -co -com -come -comes -contain -containing -contains -could -couldnt -d -date -did -didn't -different -do -does -doesn't -doing -done -don't -down -downwards -due -during -e -each -ed -edu -effect -eg -eight -eighty -either -else -elsewhere -end -ending -enough -especially -et -et-al -etc -even -ever -every -everybody -everyone -everything -everywhere -ex -except -f -far -few -ff -fifth -first -five -fix -followed -following -follows -for -former -formerly -forth -found -four -from -further -furthermore -g -gave -get -gets -getting -give -given -gives -giving -go -goes -gone -got -gotten -h -had -happens -hardly -has -hasn't -have -haven't -having -he -hed -hence -her -here -hereafter -hereby -herein -heres -hereupon -hers -herself -hes -hi -hid -him -himself -his -hither -home -how -howbeit -however -hundred -i -id -ie -if -i'll -im -immediate -immediately -importance -important -in -inc -indeed -index -information -instead -into -invention -inward -is -isn't -it -itd -it'll -its -itself -i've -j -just -k -keep -keeps -kept -keys -kg -km -know -known -knows -l -largely -last -lately -later -latter -latterly -least -less -lest -let -lets -like -liked -likely -line -little -'ll -look -looking -looks -ltd -m -made -mainly -make -makes -many -may -maybe -me -mean -means -meantime -meanwhile -merely -mg -might -million -miss -ml -more -moreover -most -mostly -mr -mrs -much -mug -must -my -myself -n -na -name -namely -nay -nd -near -nearly -necessarily -necessary -need -needs -neither -never -nevertheless -new -next -nine -ninety -no -nobody -non -none -nonetheless -noone -nor -normally -nos -not -noted -nothing -now -nowhere -o -obtain -obtained -obviously -of -off -often -oh -ok -okay -old -omitted -on -once -one -ones -only -onto -or -ord -other -others -otherwise -ought -our -ours -ourselves -out -outside -over -overall -owing -own -p -page -pages -part -particular -particularly -past -per -perhaps -placed -please -plus -poorly -possible -possibly -potentially -pp -predominantly -present -previously -primarily -probably -promptly -proud -provides -put -q -que -quickly -quite -qv -r -ran -rather -rd -re -readily -really -recent -recently -ref -refs -regarding -regardless -regards -related -relatively -research -respectively -resulted -resulting -results -right -run -s -said -same -saw -say -saying -says -sec -section -see -seeing -seem -seemed -seeming -seems -seen -self -selves -sent -seven -several -shall -she -shed -she'll -shes -should -shouldn't -show -showed -shown -showns -shows -significant -significantly -similar -similarly -since -six -slightly -so -some -somebody -somehow -someone -somethan -something -sometime -sometimes -somewhat -somewhere -soon -sorry -specifically -specified -specify -specifying -state -states -still -stop -strongly -sub -substantially -successfully -such -sufficiently -suggest -sup -sure - t -take -taken -taking -tell -tends -th -than -thank -thanks -thanx -that -that'll -thats -that've -the -their -theirs -them -themselves -then -thence -there -thereafter -thereby -thered -therefore -therein -there'll -thereof -therere -theres -thereto -thereupon -there've -these -they -theyd -they'll -theyre -they've -think -this -those -thou -though -thoughh -thousand -throug -through -throughout -thru -thus -til -tip -to -together -too -took -toward -towards -tried -tries -truly -try -trying -ts -twice -two -u -un -under -unfortunately -unless -unlike -unlikely -until -unto -up -upon -ups -us -use -used -useful -usefully -usefulness -uses -using -usually -v -value -various -'ve -very -via -viz -vol -vols -vs -w -want -wants -was -wasn't -way -we -wed -welcome -we'll -went -were -weren't -we've -what -whatever -what'll -whats -when -whence -whenever -where -whereafter -whereas -whereby -wherein -wheres -whereupon -wherever -whether -which -while -whim -whither -who -whod -whoever -whole -who'll -whom -whomever -whos -whose -why -widely -willing -wish -with -within -without -won't -words -world -would -wouldn't -www -x -y -yes -yet -you -youd -you'll -your -youre -yours -yourself -yourselves -you've -z -zero diff --git a/static/stopwords/fra b/static/stopwords/fra deleted file mode 100644 index 1c1522b47..000000000 --- a/static/stopwords/fra +++ /dev/null @@ -1,124 +0,0 @@ -alors -au -aucuns -aussi -autre -avant -avec -avoir -bon -car -ce -cela -ces -ceux -chaque -ci -comme -comment -dans -des -du -dedans -dehors -depuis -deux -devrait -doit -donc -dos -droite -début -elle -elles -en -encore -essai -est -et -eu -fait -faites -fois -font -force -haut -hors -ici -il -ils -je -la -le -les -leur -là -ma -maintenant -mais -mes -mine -moins -mon -mot -même -ni -nommés -notre -nous -nouveaux -ou -où -par -parce -parole -pas -personnes -peut -peu -pièce -plupart -pour -pourquoi -quand -que -quel -quelle -quelles -quels -qui -sa -sans -ses -seulement -si -sien -son -sont -sous -soyez -sur -ta -tandis -tellement -tels -tes -ton -tous -tout -trop -très -tu -valeur -voie -voient -vont -votre -vous -vu -ça -étaient -état -étions -été -être diff --git a/static/stopwords/he b/static/stopwords/he deleted file mode 100644 index a213f5594..000000000 --- a/static/stopwords/he +++ /dev/null @@ -1,87 +0,0 @@ -של -את -על -לא -כי -עם -הוא -גם -ב -זה -היא -כל -יותר -או -אבל -בין -היה -אם -מיליון -יש -כך -אני -הם -דולר -אמר -עד -לאחר -ישראל -רק -שקל -כדי -מה -לפני -אחד -החברה -כמו -זאת -היום -אך -ל -ה -כ -אין -אתמול -שלא -כבר -עוד -לו -זו -אל -בן -אותו -שני -בית -ידי -כמה -ביותר -ולא -הממשלה -אחרי -חברת -היתה -שלו -היו -נגד -בכל -אביב -ראש -בישראל -לי -שנים -פי -בו -מ -מאוד -להיות -שהוא -מי -אלף -אלא -אף -אחר -הזה -אחת -בבית -אלה -אנחנו