Skip to content

Commit

Permalink
Added italian language files and test - FIxed readme on how to load w…
Browse files Browse the repository at this point in the history
…ithout composer
  • Loading branch information
ScIEnzY committed Jun 17, 2021
1 parent fe7a136 commit 965f8df
Show file tree
Hide file tree
Showing 4 changed files with 657 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ use DonatelloZa\RakePlus\RakePlus;
<?php

require 'path/to/AbstractStopwordProvider.php';
require 'path/to/ILangParseOptions.php';
require 'path/to/LangParseOptions.php';
require 'path/to/StopwordArray.php';
require 'path/to/StopwordsPatternFile.php';
require 'path/to/StopwordsPHP.php';
Expand Down
23 changes: 23 additions & 0 deletions examples/it_IT_example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

// Per eseguire questo script:
// $ cd examples
// $ php it_IT_example.php "Un testo di esempio da cui estrarre le parole chiave"

require '../vendor/autoload.php';

use DonatelloZa\RakePlus\RakePlus;

if ($argc < 2) {
echo "Inserisci il testo che vuoi che sia analizzato, per esempio:\n";
echo "php it_IT_example.php \"Un testo di esempio da cui estrarre le parole chiave\"\n";
exit(1);
}

$keywords = RakePlus::create($argv[1], 'it_IT')->keywords();
print "Parole chiave estratte da \"{$argv[1]}\":\n";
print_r($keywords);

$phrases = RakePlus::create($argv[1])->get();
print "Frasi estratte da \"{$argv[1]}\":\n";
print_r($phrases);
1 change: 1 addition & 0 deletions lang/it_IT.pattern
Original file line number Diff line number Diff line change
@@ -0,0 +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
Loading

0 comments on commit 965f8df

Please sign in to comment.