Skip to content

Commit 567b7e9

Browse files
authored
Merge pull request #25 from ScIEnzY/master
Added italian language files and test and fixed readme on how to load without composer
2 parents 5e9215f + 965f8df commit 567b7e9

File tree

4 files changed

+657
-0
lines changed

4 files changed

+657
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ use DonatelloZa\RakePlus\RakePlus;
8282
<?php
8383

8484
require 'path/to/AbstractStopwordProvider.php';
85+
require 'path/to/ILangParseOptions.php';
86+
require 'path/to/LangParseOptions.php';
8587
require 'path/to/StopwordArray.php';
8688
require 'path/to/StopwordsPatternFile.php';
8789
require 'path/to/StopwordsPHP.php';

examples/it_IT_example.php

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
// Per eseguire questo script:
4+
// $ cd examples
5+
// $ php it_IT_example.php "Un testo di esempio da cui estrarre le parole chiave"
6+
7+
require '../vendor/autoload.php';
8+
9+
use DonatelloZa\RakePlus\RakePlus;
10+
11+
if ($argc < 2) {
12+
echo "Inserisci il testo che vuoi che sia analizzato, per esempio:\n";
13+
echo "php it_IT_example.php \"Un testo di esempio da cui estrarre le parole chiave\"\n";
14+
exit(1);
15+
}
16+
17+
$keywords = RakePlus::create($argv[1], 'it_IT')->keywords();
18+
print "Parole chiave estratte da \"{$argv[1]}\":\n";
19+
print_r($keywords);
20+
21+
$phrases = RakePlus::create($argv[1])->get();
22+
print "Frasi estratte da \"{$argv[1]}\":\n";
23+
print_r($phrases);

lang/it_IT.pattern

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/\bvostro\b|\bvostri\b|\bvostre\b|\bvostra\b|\bvolte\b|\bvolta\b|\bvoi\b|\bvita\b|\bvisto\b|\bvicino\b|\bvia\b|\bvi\b|\bverso\b|\bvario\b|\bvarie\b|\bvaria\b|\bvari\b|\bvale\b|\bva\b|\buomo\b|\buno\b|\buna\b|\bun\b|\bultimo\b|\bulteriore\b|\buguali\b|\btutto\b|\btutti\b|\btutte\b|\btuttavia\b|\btutta\b|\btuoi\b|\btuo\b|\btue\b|\btua\b|\btu\b|\btrovato\b|\btroppo\b|\btrenta\b|\btre\b|\btranne\b|\btra\b|\btorino\b|\btitolo\b|\bti\b|\btempo\b|\bte\b|\btanto\b|\btalvolta\b|\btali\b|\btale\b|\bsuoi\b|\bsuo\b|\bsullo\b|\bsulle\b|\bsulla\b|\bsull\b|\bsul\b|\bsui\b|\bsugli\b|\bsugl\b|\bsue\b|\bsuccessivo\b|\bsuccessivamente\b|\bsubito\b|\bsua\b|\bsu\b|\bsto\b|\bstiate\b|\bstiano\b|\bstiamo\b|\bstia\b|\bstetti\b|\bstettero\b|\bstette\b|\bstesti\b|\bsteste\b|\bstesso\b|\bstessimo\b|\bstessi\b|\bstessero\b|\bstesse\b|\bstessa\b|\bstemmo\b|\bstavo\b|\bstavi\b|\bstavate\b|\bstavano\b|\bstavamo\b|\bstava\b|\bstato\b|\bstati\b|\bstate\b|\bstata\b|\bstarò\b|\bstarete\b|\bstaresti\b|\bstareste\b|\bstaremo\b|\bstaremmo\b|\bstarei\b|\bstarebbero\b|\bstarebbe\b|\bstaranno\b|\bstarai\b|\bstarà\b|\bstanno\b|\bstando\b|\bstai\b|\bsta\b|\bsrl\b|\bspesso\b|\bsotto\b|\bsopra\b|\bsono\b|\bsoltanto\b|\bsolo\b|\bsolito\b|\bsig\b|\bsiete\b|\bsiate\b|\bsiano\b|\bsiamo\b|\bsia\b|\bsi\b|\bsette\b|\bsenza\b|\bsempre\b|\bsembri\b|\bsembrato\b|\bsembrare\b|\bsembra\b|\bsei\b|\bseguito\b|\bseguente\b|\bsecondo\b|\bse\b|\bscorso\b|\bscopo\b|\bscola\b|\bsarò\b|\bsarete\b|\bsaresti\b|\bsareste\b|\bsaremo\b|\bsaremmo\b|\bsarei\b|\bsarebbero\b|\bsarebbe\b|\bsaranno\b|\bsarai\b|\bsarà\b|\bsara\b|\bsalvo\b|\briecco\b|\brelativo\b|\bregistrazione\b|\brecentemente\b|\brecente\b|\brealmente\b|\bquindi\b|\bqui\b|\bquesto\b|\bquesti\b|\bqueste\b|\bquesta\b|\bquest\b|\bquello\b|\bquelli\b|\bquelle\b|\bquella\b|\bquel\b|\bquattro\b|\bquasi\b|\bquantunque\b|\bquanto\b|\bquanti\b|\bquante\b|\bquanta\b|\bquando\b|\bqualunque\b|\bquali\b|\bquale\b|\bqualcuno\b|\bqualcuna\b|\bqualcosa\b|\bqualche\b|\bpurtroppo\b|\bpure\b|\bpuò\b|\bpuo\b|\bproprio\b|\bprobabilmente\b|\bprincipalmente\b|\bprimo\b|\bprima\b|\bpress\b|\bpresa\b|\bpreferibilmente\b|\bpotrebbe\b|\bposto\b|\bposteriore\b|\bpossedere\b|\bpossa\b|\bpoiche\b|\bpoi\b|\bpoco\b|\bpochissimo\b|\bpo\b|\bpiuttosto\b|\bpiù\b|\bpiu\b|\bpiglia\b|\bpieno\b|\bpiedi\b|\bpersone\b|\bpersino\b|\bperò\b|\bpero\b|\bperfino\b|\bperciò\b|\bpercio\b|\bperchè\b|\bperché\b|\bperche\b|\bper\b|\bpeggio\b|\bpeccato\b|\bpartendo\b|\bparte\b|\bparecchio\b|\bparecchie\b|\bparecchi\b|\bpaese\b|\botto\b|\bottanta\b|\bossia\b|\bosi\b|\bore\b|\bora\b|\boppure\b|\boltre\b|\bognuno\b|\bognuna\b|\bogni\b|\boggi\b|\bod\b|\bo(?!(-|'))\b|\bnuovo\b|\bnulla\b|\bnove\b|\bnovanta\b|\bnostro\b|\bnostri\b|\bnostre\b|\bnostra\b|\bnonsia\b|\bnonostante\b|\bnondimeno\b|\bnon\b|\bnoi\b|\bno\b|\bniente\b|\bnessuno\b|\bnessuna\b|\bnessun\b|\bneppure\b|\bnemmeno\b|\bnello\b|\bnelle\b|\bnella\b|\bnell\b|\bnel\b|\bnei\b|\bnegli\b|\bnegl\b|\bne\b|\bnazionale\b|\bmosto\b|\bmondo\b|\bmomento\b|\bmolto\b|\bmoltissimo\b|\bmolti\b|\bmodo\b|\bmio\b|\bministro\b|\bminimi\b|\bmilioni\b|\bmiliardi\b|\bmila\b|\bmiei\b|\bmie\b|\bmia\b|\bmi\b|\bmezzo\b|\bmesi\b|\bmentre\b|\bmeno\b|\bmeglio\b|\bmediante\b|\bmedesimo\b|\bme\b|\bmarche\b|\bmancanza\b|\bmalissimo\b|\bmalgrado\b|\bmale\b|\bmai\b|\bmaggior\b|\bmagari\b|\bmacche\b|\bma\b|\bluogo\b|\blungo\b|\blui\b|\bloro\b|\blontano\b|\blo\b|\bli\b|\blei\b|\ble\b|\blavoro\b|\blato\b|\blasciato\b|\blà\b|\bla\b|\bl(?!(-|'))\b|\bio\b|\binvece\b|\bintorno\b|\bintanto\b|\binsieme\b|\binoltre\b|\binfatti\b|\binc\b|\bin\b|\bimprovviso\b|\bil\b|\bieri\b|\bIE\b|\bi(?!(-|'))\b|\bho\b|\bhanno\b|\bhai\b|\bhaha\b|\bha\b|\bgruppo\b|\bgrazie\b|\bgrande\b|\bgoverno\b|\bgliene\b|\bglielo\b|\bglieli\b|\bgliele\b|\bgliela\b|\bgli\b|\bgiorno\b|\bgiorni\b|\bgiacche\b|\bgià\b|\bgia\b|\bgenerale\b|\bfuturo\b|\bfurono\b|\bfuori\b|\bfummo\b|\bfui\b|\bfu\b|\bfrattempo\b|\bfra\b|\bfosti\b|\bfoste\b|\bfossimo\b|\bfossi\b|\bfossero\b|\bfosse\b|\bforza\b|\bforse\b|\bfino\b|\bfine\b|\bfinche\b|\bfinalmente\b|\bfin\b|\bfeci\b|\bfecero\b|\bfece\b|\bfavore\b|\bfatto\b|\bfarò\b|\bfarete\b|\bfaresti\b|\bfareste\b|\bfaremo\b|\bfaremmo\b|\bfarei\b|\bfarebbero\b|\bfarebbe\b|\bfare\b|\bfaranno\b|\bfarai\b|\bfarà\b|\bfanno\b|\bfai\b|\bfacevo\b|\bfacevi\b|\bfacevate\b|\bfacevano\b|\bfacevamo\b|\bfaceva\b|\bfacesti\b|\bfaceste\b|\bfacessimo\b|\bfacessi\b|\bfacessero\b|\bfacesse\b|\bfacendo\b|\bfacemmo\b|\bfaccio\b|\bfacciate\b|\bfacciano\b|\bfacciamo\b|\bfaccia\b|\bfa\b|\bex\b|\bessi\b|\bessere\b|\besser\b|\bessendo\b|\besse\b|\besempio\b|\bero\b|\beri\b|\beravate\b|\beravamo\b|\berano\b|\bera\b|\beppure\b|\bentrambi\b|\bella\b|\begli\b|\beffettivamente\b|\bed\b|\becco\b|\becc\b|\bebbi\b|\bebbero\b|\bebbe\b|\bè(?!(-|'))\b|\be(?!(-|'))\b|\bdurante\b|\bdunque\b|\bdue\b|\bdovunque\b|\bdovrà\b|\bdovra\b|\bdove\b|\bdov\b|\bdopo\b|\bdiventato\b|\bdiventare\b|\bdiventa\b|\bdirimpetto\b|\bdire\b|\bdietro\b|\bdice\b|\bdi\b|\bdeve\b|\bdetto\b|\bdentro\b|\bdello\b|\bdelle\b|\bdella\b|\bdell\b|\bdel\b|\bdei\b|\bdegli\b|\bdegl\b|\bdavanti\b|\bdappertutto\b|\bdallo\b|\bdalle\b|\bdalla\b|\bdall\b|\bdal\b|\bdai\b|\bdagli\b|\bdagl\b|\bda\b|\bd(?!(-|'))\b|\bcui\b|\bcosì\b|\bcosi\b|\bcosa\b|\bcos\b|\bcortesia\b|\bcontro\b|\bconsiglio\b|\bconclusione\b|\bconciliarsi\b|\bconcernente\b|\bcon\b|\bcomunque\b|\bcominci\b|\bcome\b|\bcolui\b|\bcoloro\b|\bcoll\b|\bcolei\b|\bcol\b|\bcoi\b|\bcogli\b|\bcodesto\b|\bcodesti\b|\bcodesta\b|\bco\b|\bcittà\b|\bcitta\b|\bcirca\b|\bcioè\b|\bcioe\b|\bciò\b|\bcio\b|\bcima\b|\bciascuno\b|\bciascuna\b|\bci\b|\bchiunque\b|\bchicchessia\b|\bchi\b|\bche\b|\bcerto\b|\bcerti\b|\bcerte\b|\bcerta\b|\bcento\b|\bcaso\b|\bcasa\b|\bc(?!(-|'))\b|\bbravo\b|\bbrava\b|\bberlusconi\b|\bbenissimo\b|\bbene\b|\bbasta\b|\bavuto\b|\bavuti\b|\bavute\b|\bavuta\b|\bavrò\b|\bavrete\b|\bavresti\b|\bavreste\b|\bavremo\b|\bavremmo\b|\bavrei\b|\bavrebbero\b|\bavrebbe\b|\bavranno\b|\bavrai\b|\bavrà\b|\bavevo\b|\bavevi\b|\bavevate\b|\bavevano\b|\bavevamo\b|\baveva\b|\bavete\b|\bavesti\b|\baveste\b|\bavessimo\b|\bavessi\b|\bavessero\b|\bavesse\b|\baverlo\b|\bavere\b|\baver\b|\bavente\b|\bavendo\b|\bavemmo\b|\bavanti\b|\battraverso\b|\battesa\b|\bassai\b|\banticipo\b|\bansa\b|\banno\b|\banni\b|\bancora\b|\banche\b|\baltrui\b|\baltrove\b|\baltro\b|\baltrimenti\b|\baltri\b|\ballora\b|\ballo\b|\balle\b|\balla\b|\ball\b|\balcuno\b|\balcuni\b|\balcuna\b|\bal\b|\bai\b|\bahimè\b|\bahime\b|\bagli\b|\bagl\b|\baffinche\b|\badesso\b|\bad\b|\baccidenti\b|\babbiate\b|\babbiano\b|\babbiamo\b|\babbia\b|\babbastanza\b|\ba(?!(-|'))\b/i

0 commit comments

Comments
 (0)