Subir archivos a 'utils'
This commit is contained in:
pare
f64d5c3b22
commit
fa5434b184
S'han modificat 1 arxius amb 380 adicions i 108 eliminacions
|
@ -18,403 +18,674 @@ function MstEtiquetes($rsst_ara) {
|
|||
// $rsst_ara_n = strtr($rsst_ara, $patro, $subst);
|
||||
// aqui de la resta (tot el que no siga vocals i nombres)
|
||||
// $rsst_ara = preg_replace('/[^A-Za-z0-9\-]/',' ',$rsst_ara_n);
|
||||
$rsst_ara = str_replace('/[^A-Za-z0-9\-]/',' ',$rsst_ara_n);
|
||||
$rsst_ara = trim(str_replace('/[^A-Za-z0-9\-]/',' ',$rsst_ara_n));
|
||||
// $rsst_ara = strtr($rsst_ara,'/[^A-Za-z0-9\-]/',' ');
|
||||
// echo $rsst_ara."\n";
|
||||
|
||||
// if(preg_match("/(Sibilla|teatr[eals]+|dramatu[rgia]+|musica[ls]|danca[ire]+|ball[arines]+|pint[ou]r[aes]|escript[oras]+|muse[usistcques]+|etnologi[caques]+|film|pellicula)/i", $rsst_ara)){
|
||||
// if(preg_match("/(compositor|simfoni[ca]*|musica|teatre|pint[ou]r|film|pellicules)/i", $rsst_ara)){
|
||||
if(preg_match("/(cultura|centre\scultural)/i", $rsst_ara)){
|
||||
if( (preg_match("/(cultura|centre\scultural|cultural)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!Nadal).)*$/im", $rsst_ara)) ) {
|
||||
// if(preg_match("/(Les\sArts|ballari[nas]*|centre\scultural|capital[s]*\scultural[s]*|humorist|actriu|actor|escultor[a]*|escenari|escriptor|exposicio|compositor|simfoni[ca]*|musica|teatre|pint[ou]r|film|pellicules|museu|comedia|Nino\sBravo)/i", $rsst_ara)){
|
||||
//one of these string found
|
||||
$etiqueta = "#Cultura";
|
||||
if(preg_match("/(disc|compositor|simfoni[ca]|musica[ls]|gira|grup|concert)/", $rsst_ara)){
|
||||
$etiqueta = "#Cultura #Música";
|
||||
$etiqueta = "#Cultura ";
|
||||
$ctrl = __LINE__;
|
||||
if( (preg_match("/(disc|compositor|simfoni[ca]+|musica[ls]*|gira|concert|eurovisio|canço|festival|Sound)/", $rsst_ara)) &&
|
||||
// (preg_match("/(?!(retrat|violencia|violacio|grupal|violacio\sgrupal))/i", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!desconcert)(?!discu[a-z]*)(?!homicidi)(?!victima)(?!canonge)(?!llibre)(?!discussio)(?!atraca)(?!drogu[aes]+)(?!grupal)(?!violacio)(?!retrat)(?!violacio\sgrupal)(?!lgtbi)(?!detingu*)(?!ferit)(?!banca)(?!discapacitat)(?!disc*).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Música ";
|
||||
$ctrl = __LINE__;
|
||||
if( (preg_match("/(Sound|festival)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!canonge)(?!llibre)(?!discussio)(?!atraca)(?!drogu[aes]+)(?!grupal)(?!violacio)(?!retrat)(?!violacio\sgrupal)(?!lgtbi)(?!detingu*)(?!ferit)(?!banca)(?!discapacitat)(?!disc*).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Festivals ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(escenari|teatre|teatrals|dramaturg|escena|Rambleta)/", $rsst_ara)){
|
||||
$etiqueta = "#Cultura #Teatre";
|
||||
}
|
||||
elseif(preg_match("/(escriptor[aesor]*|novel·la|litera[ritua])/", $rsst_ara)){
|
||||
$etiqueta = "#Cultura #Literatura";
|
||||
elseif(preg_match("/(escriptor[aesor]*|novel·la|litera[ritua]+)/", $rsst_ara)){
|
||||
$etiqueta = "#Cultura #Literatura ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(pint[urao]+|quadres|galeria|Sorolla)/", $rsst_ara)){
|
||||
$etiqueta = "#Cultura #Pintura";
|
||||
elseif( (preg_match("/(escenari|teatre|teatrals|dramaturg|escena|Rambleta|comedia)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!esports)(?!Sound).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Teatre ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(ball[rinase]+|dança)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!Treball)/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Dança";
|
||||
elseif( (preg_match("/(pint[urao]+|quadres|galeria|Sorolla)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!fotogaleria).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Pintura ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(cine|pel·licula|Filmoteca|Guerra\sde\sles\sGalaxies|rodatge|audiovisual|curtmetratge)/", $rsst_ara)){
|
||||
$etiqueta = "#Cinema";
|
||||
elseif( (preg_match("/(ball[rinase]+|dança)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!treball).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Dança ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(moros\si\cristians|ninot|lofrena|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta[es]*|focs\artificials|carnestoltes|gaiat[esra]+|falle[ares]+|fogueres\sdAlacant|bellesa\sdel\sfoc|artist[aes]+\sfaller[s]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Festes";
|
||||
elseif(preg_match("/(Bafta|Globus\sd'or|cine[astam]*|pel-licula|pel·lícula|pel·licula|Filmoteca|Guerra\sde\sles\sGalaxies|rodatge|audiovisual|curtmetratge|llargmetratge)/i", $rsst_ara)){
|
||||
$etiqueta = "#Cinema ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(agricultura|agricola|animals|porc[s]*\ssenglar[s]*|biodiversitat|biosfera|ecologi[aictes]+|entorn[s]*\snatural[s]*|subaquatic)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!Corpus).)*$/m", $rsst_ara)) ) {
|
||||
$etiqueta = "#MediAmbient ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(fira\sde\sjuliol|moros\si\cristians|ninot|lofrena|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta[es]*|focs\artificials|carnestoltes|gaiat[esra]+|falle[ares]+|fogueres|fogueres\sd'Alacant|fogueres\s2023|bellesa\sdel\sfoc|artist[aes]+\sfaller[s]*|tomatina)/i", $rsst_ara)){
|
||||
$etiqueta = "#Festes ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(mor[t]*)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!amor|moros\si\cristians)/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Necrològica";
|
||||
// (preg_match("/(?!(amor|moros\si\cristians|humor|Morella|mor[a-z]+|[a-z]+mor))/i", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!amor)(?!Morella)(?!moros)(?!humor)(?!mor[az]+)(?![az]*mor).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Necrològica ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(animals|porc[s]*\ssenglar[s]*|biodiversitat|biosfera|ecologi[aictes]+)/", $rsst_ara)){
|
||||
$etiqueta = "#MediAmbient";
|
||||
elseif( (preg_match("/(Corpus|roques|processo)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!useres)(?!processos).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Corpus ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(Setmana\sSanta|processo|Tamborada|Diumenge\sde\sRams)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!useres|processos)/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#SetmanaSanta";
|
||||
(preg_match("/^(?:(?!useres)(?!processos).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#SetmanaSanta ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Pentagon|caça|missil|atac|guerra|batalla|atac|tropes|alto\sel\foc|treva|dron|avio|pilot)/", $rsst_ara)){
|
||||
$etiqueta = "#Món #Guerra";
|
||||
elseif( (preg_match("/(ofensiva|ucraina|Pentagon|caça|missil|atac|guerra|batalla|atac|tropes|alto\sel\foc|treva|dron|avio|pilot|ofensiva)/i", $rsst_ara)) &&
|
||||
// (preg_match("/^(?!.*atraca|.*drogu[aes]+|.*grupal|.*violacio|.*retrat|.*violacio\sgrupal).*$/i", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!lluna)(?!recerca)(?!Morella)(?!Campello).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Món #Guerra ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Volkswagen|gigafactoria)/", $rsst_ara)) {
|
||||
$etiqueta = "#Economia";
|
||||
$etiqueta = "#Economia ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(agricultura|biosfera|ecosistema)/i", $rsst_ara)) {
|
||||
elseif(preg_match("/(moros\si\scristians|ninot|lofrena|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta[es]*|focs\artificials|carnestoltes|gaiat[esra]+|falle[ares]+|fogueres\s2023|fogueres\sdAlacant|belles[aes]+\sdel\sfoc|artist[aes]+\sfaller[s]*|tomatina)/i", $rsst_ara)){
|
||||
$etiqueta = "#Festes ";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(agricultura|biosfera|ecosistema|entorn[s]*\snatural[s]*)/i", $rsst_ara)) {
|
||||
$etiqueta = "#MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(mon[aes]+|Pasqua)/i", $rsst_ara)) {
|
||||
$etiqueta = "#Pasqua";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(pastera|migrant)/i", $rsst_ara)){
|
||||
$etiqueta = "#Immigració";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Benidorm\sFest)/i", $rsst_ara)){
|
||||
$etiqueta = "#BenidormFest";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Tik\sTok|Instagram|Facebook|Twitter|Whatsapp|Linkedin|app[s]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Xarxes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(turisme\srural|bany)/i", $rsst_ara)){
|
||||
$etiqueta = "#Natura #Turisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
// elseif(preg_match("/(llibertat\sdexpressio|parc\scientific|accidents\slaborals|planta\ssolar|desnon[enmta]+|despoblament|xef|rebaixe|turis[metas]|carreter[aes]|energia|cava|identitat|digital|llengua|castella[noparlts]|arquebisb[eat]+)/i", $rsst_ara)){
|
||||
elseif((preg_match("/(societat)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!real)/", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!real).)*$/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Societat";
|
||||
$ctrl = __LINE__;
|
||||
|
||||
if(preg_match("/(dependencia|dependents)/", $rsst_ara)){
|
||||
$etiqueta = "#Societat #Dependència";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(voltor|conservacionista|ecologic|ecologiques|vegetacio)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(llacuna|tortuga|voltor|conservacionista|ecologic|ecologiques|vegetacio)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!fons\svoltor).)*$/im" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Societat #Ecologia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(hotel|turis[metas]+|estranger)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!vehicle|automobil)/i" ,$rsst_ara)) ){
|
||||
elseif( (preg_match("/(tradicio|historic|reviu)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!esports).)*$/im" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Societat #Tradicions";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(hotel[era]*|turis[a-z]+|estranger|platges\saccessibles|platja\saccessible)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!vehicle)(?!automobil)(?!llengua\sestrangera)(?!moto)(?!lladre)(?!accident).)*$/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Societat #Turisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(bous|tauri[aens]|animal[s]*)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(bous|tauri[aens]|animal[s]*|caç[aera]+)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!platja\sper\sa\sgossos)(?!excrements).)*$/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Societat #MaltractamentAnimal";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(renovables|eolic|planta\ssolar|fotovoltai[cques]+)/", $rsst_ara)){
|
||||
elseif(preg_match("/(renovables|eolic|planta\ssolar|fotovoltai[cques]+|calefaccio)/", $rsst_ara)){
|
||||
$etiqueta = "#Societat #Energia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(TSJ[CV]*|Tribunal|judici|condema)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(judicial|TSJSuprem|jutjat|condemna|Audiencia\sNacional|Fiscalia|TC|Tribunal|sentenci[aes]+|cassaci|CGPJ|Constitucional[s]*)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!prejudici)(?!esport).)*$/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(nazi|feixis[meta]+)/", $rsst_ara)){
|
||||
$etiqueta = "#Tribunals #Feixisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(agressio\ssexual|abus\ssexual)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!prejudici)(?!esport).)*$/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Tribunals #Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(pastera)/i", $rsst_ara)){
|
||||
$etiqueta = "#Immigració";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(microplastic|animals|porc[s]*\ssenglar[s]*|biodiversitat|biosfera|ecologi[aictes]+)/", $rsst_ara)){
|
||||
elseif(preg_match("/(mediambiental|microplastic|animals|porc[s]*\ssenglar[s]*|biodiversitat|biosfera|ecologi[aictes]+|entorn[s]*\snatural[s]*|tortug|desov)/", $rsst_ara)){
|
||||
$etiqueta = "#MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(cos\ssense\svida|detenen|detingut|criminal|abatut[s]*|estaf[aes]+|naufragi|rescat[entads]*|estaf[aen]+|danys\spersonals|violen[ciatment]|apunyala[atd]|exparella|atracador[s]\sde\sbanc|violencia\sde\sgenere|allau|atropell[adt]+|segrest[ador]|mor[tairen]+|autopsi[aes]|cadaver[s]|mata|assassi[nsat]|detingu[tsdea]|polici[alse]|robatori[s]|accident|sinistre|atracament[sdora]|feri[tsdesa]+|homicidi|preso[nera]|violad[arcio]|incendi|traficar)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!Moraig)/", $rsst_ara)) ) {
|
||||
elseif( (preg_match("/(aplicacio|app|mobil|tecnologi|telescopi)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!(?!mobil[a-z]+)(?![Ii]mmobil)(?!mobilitat)(?!mobilitzacio).)*$/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Societat #Tecnologia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(feminis[meta]+|abus\ssexual|parella|violació\sgrupal|masclis[meta]+|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta]+)/", $rsst_ara)){
|
||||
$etiqueta = "#Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(ofegat|baralla|xoc|ferit|ofega|cadaver|cos\ssense\svida|detenen|detingut|criminal|abatut[s]*|estaf[aes]+|naufragi|rescat[entads]*|estaf[aen]+|danys\spersonals|violen[ciatment]+|apunyala[atd]|exparella|atracador[s]*\sde\sbanc[s]*|violencia\sde\sgenere|allau|atropell[adt]+|segrest[ador]*|mor[tairen]*|autopsi[aes]|cadaver[s]*|mata|assassi[nsat]|detingu[tsdea]+|polici[alse]+|robatori[s]*|accident|sinistre|atracament[sdora]*|feri[tsdesa]+|homicidi|preso[nera]*|violad[arcio]+|incendi|traficar|DGT)/i", $rsst_ara)) &&
|
||||
// (preg_match("/(?!(mor[ao]+|rodatge|tomata|serie|tumor|tractament|[a-z]+mor|Podem|Sumar|moro))/i", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!incendi\sforestal)(?!laboral)(?!Gaza)(?!israel)(?!Moraira)(?!Morella)(?!rodatge)(?!tomata)(?!serie)(?!tumor)(?!tractament)(?!amor)(?!Podem)(?!Sumar)(?!moro)(?!moral)(?!amor)(?!palest).)*$/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Successos";
|
||||
if(preg_match("/(incendi[s]*\sforestal[s]*)/", $rsst_ara)) {
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(incendi[s]*\sforestal[s]*|forestal|muntany[aes]+)/", $rsst_ara)) {
|
||||
$etiqueta = "#Successos #MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(violar|sexual[ment]*|abus[ar]*\ssexual[ment]*|exparella|masclis[meta]|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta])/", $rsst_ara)){
|
||||
elseif(preg_match("/(agressio\ssexual|violencia\sde\sgenere|feminista|violar|sexual[ment]*|abus[ar]*\ssexual[ment]*|exparella|parella|masclis[meta]+|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta])/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(col·lisió|cotxe|camio|accident|DGT)/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Transit";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(Parkinson|autisme|fer\esport|oncologi|leucemia|cancer|diagnostic|fibrosi|encefalitis|cancer\sde|Parkinson|pediatr[aes]+|vacuna[cio]*|respiratori|grip|estreptococ|bronquiolitis|pandemia|malaltia|covid|neumonia|hospital[itz]*|sanita[tri]+|salut|infecci[ons]+)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(salut\smental|ansietat|malalt|tractament|Parkinson|autisme|fer\esport|oncologi|leucemia|cancer|diagnostic|fibrosi|encefalitis|cancer\sde|Parkinson|pediatr[aes]+|vacuna[cio]*|respiratori|grip|estreptococ|bronquiolitis|pandemia|malaltia|covid|neumonia|hospital[itz]*|sanita[tri]+|salut|infecci[ons]+|trastorn[s]*\salimentari)/i", $rsst_ara)){
|
||||
$etiqueta = "#Salut";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(pandemia|covid|endemia)/", $rsst_ara)){
|
||||
$etiqueta = "#Sanitat #Salut";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(salut\smental|ansietat|depressio)/", $rsst_ara)){
|
||||
$etiqueta = "#SalutMental";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(abus\ssexual|exparella|masclis[meta]|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta])/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Masclisme";
|
||||
}
|
||||
elseif(preg_match("/(xef|cuin[aer]*|aliment)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(xef|cuin[aer]*|aliment|Michelin|restaurant)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!.*(malalt|mal\sestat|contaminat|abell[aes]+|bomber|ONG)).*/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Societat #Gastronomia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(ERTO|ERO|plantilla|treballadors)/", $rsst_ara)){
|
||||
$etiqueta = "#Treball";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Tik\sTok|Instagram|Facebook|Twitter|Whatsapp|Linkedin|app[s]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Xarxes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(condemna|Audiencia\sNacional|Fiscalia|TC|Tribunal|sentenci[aes]+|cassaci|CGPJ|Constitucional[s]*)/", $rsst_ara)){
|
||||
$etiqueta = "#Tribunals";
|
||||
}
|
||||
elseif(preg_match("/(fosses\scomunes|victimes\sdel\sfranquisme|memoria\sdemocratics|Guerra\sCivil|franquisme)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(fosses\scomunes|victimes\sdel\sfranquisme|memoria\sdemocratica|Guerra\sCivil|franquisme)/i", $rsst_ara)){
|
||||
$etiqueta = "#MemòriaHistòrica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(bunyols|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta|focs\artificials|carnestoltes|gaiat[esra]+|falles|faller[a]*|fogueres\sdAlacant|bellesa\sdel\sfoc)/", $rsst_ara)){
|
||||
elseif(preg_match("/(transit|cotxe|camio|vehicle|automobil|autopista|retencio|carretera|carril|DGT)/i", $rsst_ara)){
|
||||
$etiqueta = "#Transit";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(correfoc|bunyols|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta|focs\artificials|carnestoltes|gaiat[esra]+|falles|faller[a]*|fogueres\sdAlacant|bellesa\sdel\sfoc|Tomatina)/", $rsst_ara)){
|
||||
$etiqueta = "#Festes";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(agressio|homofob|ferit|insult)/", $rsst_ara)){
|
||||
$etiqueta = "#Festes #Successos";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif( (preg_match("/(Corpus|roques|processo)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!.*(useres|processos))/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Corpus";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(Setmana\sSanta|processo|Tamborada)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!processos)/", $rsst_ara)) ){
|
||||
$etiqueta = "#SetmanaSanta";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/([Pp]asqua)/", $rsst_ara)){
|
||||
$etiqueta = "#Pasqua";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(8M|Llei\sde\sIgualtat|LGTBI|8\sde\sMarç)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!28M)/", $rsst_ara)) ){
|
||||
(preg_match("/(?!28M|28m)/", $rsst_ara)) ){
|
||||
$etiqueta = "#Feminisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(incendi|accident|robatori|furtar|policia|Guardia\sCivil)/", $rsst_ara)){
|
||||
elseif(preg_match("/(eleccions-28M|28M|23J|campanya\selectoral|eleccions|generals|candidat[uraes]*|precampanya|programa\selectoral|votacio|electoral|reeleccio)/", $rsst_ara)){
|
||||
$etiqueta = "#Eleccions";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(9J|9\sde\sjuny|eleccions\seuropees|europees)/", $rsst_ara)) {
|
||||
$etiqueta = "#EleccionsEuropees9J";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(incendi|accident|robatori[s]*|furtar|policia|Guardia\sCivil)/", $rsst_ara)){
|
||||
$etiqueta = "#Successos";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(violar|sexual[ment]*|abus[ar]*\ssexual[ment]*|exparella|masclis[meta]|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta])/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(agressio|homofob|ferit|insult)/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Homofòbia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(llibertat|sense\sfiança|jutjat)/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
if( (preg_match("/(disc|compositor|simfoni[ca]+|musica[ls]*|gira|concert)/", $rsst_ara))&&
|
||||
(preg_match("/^(?:(?!discu[a-z]*)(?!llibre)(?!homicidi)(?!ferit)(?!atraca)(?!drogu[aes]+)(?!grupal)(?!violacio)(?!retrat)(?!violacio\sgrupal)(?!lgtbi)(?!agressio)(?!banca)(?!desapareg)(?!discapacitat)(?!educacio)(?!esport*).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Cultura #Música";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(oratge|llamp|hivern|primaver[als]+|estiu|tardor|nuvo[ls]+|calo[rsad]+|plu[jages]+|boir[aes]+|tempest[aes]+|neva[rtdaes]*|tronad[aes]+|pedregad[aes]+|grani[sda]+|ponent[ada]*|mestral|temperatur[aes]+)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!manifestacio|Amazon|computa[ciodr]+)/", $rsst_ara)) ){
|
||||
// (preg_match("/(?!.*(feminis|escola|parasol|sahrauis|manifestacio|Amazon|computa[ciodr]+|Comissio|festiu|operacio\sexida|droga|drogues|festiu))/", $rsst_ara)) ){
|
||||
(preg_match("/^(?:(?!xiringuito)(?!apartaments)(?!hotel)(?!incendi)(?!cirurgi)(?!protesi)(?!festiu)(?!feminis)(?!escola)(?!saraui)(?!Amazon)(?!computa)(?!Comissio)(?!operacio\seixida)(?!droga)(?!drogues)(?!tortug[aues]+)(?!ofega[desmnt]*).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Oratge";
|
||||
$ctrl = __LINE__;
|
||||
if( (preg_match("/(onada\sde\scalor|canvi\sclimatic)/", $rsst_ara))&&
|
||||
(preg_match("/^(?:(?!llibre)(?!atraca)(?!drogu[aes]+)(?!grupal)(?!violacio)(?!retrat)(?!violacio\sgrupal)(?!lgtbi)(?!agressio)(?!banca)(?!desapareg)(?!discapacitat)(?!educacio)(?!esport*).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Oratge #CrisiClimàtica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(28M|campanya\selectoral|eleccions|candidat[uraes]*|precampanya|programa\selectoral|votacio|electoral)/", $rsst_ara)){
|
||||
$etiqueta = "#Eleccions28M";
|
||||
}
|
||||
elseif( (preg_match("/(Audiencia\sde\s|TSJCV|sentència|condemna)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!prejudici)(?!esport).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(temperatures|climatic|onada\sde\scalor|onades\sde\scalor)/", $rsst_ara)) {
|
||||
$etiqueta = "#EmergènciaClimàtica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Volkswagen|gigafactoria)/", $rsst_ara)) {
|
||||
$etiqueta = "#Economia #Societat";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(porc[s]*\ssenglar[s]*|agricultors|incendi[s]*\sforestal[s]*)/", $rsst_ara)) {
|
||||
elseif(preg_match("/(porc[s]*\ssenglar[s]*|agricultors|incendi[s]*\sforestal[s]*|entorn[s]*\snatural[s]*)/", $rsst_ara)) {
|
||||
$etiqueta = "#MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Alacant[inaes]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Alacant";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Castello[necs]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Castelló";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Valencia[nse]*)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(Valencia[nse]*)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!falles).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#València";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(Generalitat|Consell[eras]*|Corts|[Pp]arlamen[taries]+)/", $rsst_ara)) &&
|
||||
(preg_match("/( ?!morada|formacio )/", $rsst_ara)) ) {
|
||||
(preg_match("/^(?!:(?!morada)(?!formacio).)*/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Consell";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(Catalunya|catala[na]*|Ponsati|Puigdemont|Borras)/", $rsst_ara)){
|
||||
$etiqueta = "#Catalunya";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(politica)/i", $rsst_ara)){
|
||||
//one of these string found
|
||||
$etiqueta = "#Política";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(Per[uanse]+|internacional[s]*|EUA|Afganhistan|Russia|Iran|Marroc)/", $rsst_ara)){
|
||||
$etiqueta = "#Política #Món";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Audiencia\sNacional|Fiscalia|TC|Tribunal|sentenci[aes]+|cassaci|CGPJ|Constitucional[s]*)/", $rsst_ara)){
|
||||
elseif(preg_match("/(Audiencia\sNacional|Fiscalia|TC|Tribunal|sentenci[aes]+|cassaci|CGPJ|Constitucional[s]*|condemna)/", $rsst_ara)){
|
||||
$etiqueta = "#Política #Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Gurtel|Imelsa|Assud|comissions|malversaci|pagaments)/", $rsst_ara)){
|
||||
$etiqueta = "#Política #Corrupció";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(28M|campanya\selectoral|eleccions|candidat[uraes]*|precampanya|programa\selectoral|votacio|electoral)/", $rsst_ara)){
|
||||
$etiqueta = "#Eleccions28M";
|
||||
elseif(preg_match("/(28M|23J|campanya\selectoral|eleccions|candidat[uraes]*|precampanya|programa\selectoral|votacio|electoral|eleccions\sgenerals)/", $rsst_ara)){
|
||||
$etiqueta = "#Eleccions";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(23J|23\sde\sjuliol|eleccions\sgenerals)/", $rsst_ara)) {
|
||||
$etiqueta = "#Eleccions23J";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(lider|PP|PSOE|CS|Podemos)/", $rsst_ara)){
|
||||
}
|
||||
elseif(preg_match("/(lider|PP|PSOE|PSPV|CS|Podemos|Podem|Sumar|Compromis)/", $rsst_ara)){
|
||||
$etiqueta = "#Política #Partits";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(nazi|ultra|extrema|dreta|colp|feixis[tame]+|vox)/i", $rsst_ara)){
|
||||
$etiqueta = "#Política #Feixisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(economia|empresa|cistella\sde\sla\compra|IPC|preus)/", $rsst_ara)){
|
||||
$etiqueta = "#Política #Economia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(dependencia)/i", $rsst_ara)){
|
||||
$etiqueta = "#Política #Dependència";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(pensions)/i", $rsst_ara)){
|
||||
$etiqueta = "#Política #Pensions";
|
||||
}
|
||||
elseif(preg_match("/(extrema|dreta|colp|feixis[tame]+)/i", $rsst_ara)){
|
||||
$etiqueta = "#Política #Feixisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(gos[so]|animal[ista]*|PACMA)/i", $rsst_ara)){
|
||||
$etiqueta = "#Ecologia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(Generalitat|[Cc]onsell[eras]*|Corts|[Pp]arlamen[tarie]+)/", $rsst_ara)) &&
|
||||
(preg_match("/( ?!morada|formacio )/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Consell";
|
||||
elseif( (preg_match("/(Generalitat|Consell[eras]*|Corts|[Pp]arlamen[taries]+|Consell)/", $rsst_ara)) &&
|
||||
(preg_match("/( ?!(morada|formacio) )/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Consell #PaísValencià";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(Catalunya|Ponsati|Puigdemont|Borras)/", $rsst_ara)){
|
||||
$etiqueta = "#Catalunya";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif( (preg_match("/(8M)/", $rsst_ara))&&
|
||||
(preg_match("/(?!28M)/", $rsst_ara)) ) {
|
||||
(preg_match("/(?!28M|28m)/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Política #Feminisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(corredor\sverd|sostenible|medi\snatural|Transicio\sEcologica|emergencia\sclimatica)/", $rsst_ara)){
|
||||
elseif(preg_match("/(corredor\sverd|sostenible|medi\snatural|Transicio\sEcologica|emergencia\sclimatica|entorn[s]*\snatural[s]*)/", $rsst_ara)){
|
||||
$etiqueta = "#MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(asteroide|planeta)/", $rsst_ara)){
|
||||
$etiqueta = "#Astronomia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(moros\si\scristians|ninot|lofrena|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta[es]*|focs\artificials|carnestoltes|gaiat[esra]+|falle[ares]+|fogueres\sdAlacant|bellesa\sdel\sfoc|artist[aes]+\sfaller[s]*)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(moros\si\scristians|ninot|lofrena|La\sMagdalena|Lechuguina|festes|festes\sfundacionals|romeria|mascleta[es]*|focs\artificials|carnestoltes|gaiat[esra]+|falle[ares]+|fogueres\sdAlacant|bellesa\sdel\sfoc|artist[aes]+\sfaller[s]*|Tomatina)/i", $rsst_ara)){
|
||||
$etiqueta = "#Festes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Valle\sde\slos\Caidos|fosses\scomunes|victimes\sdel\sfranquisme|memoria\sdemocratics|Guerra\sCivil|franquisme)/i", $rsst_ara)){
|
||||
$etiqueta = "#MemòriaHistòrica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(mor[ts]*|precipitar|defuncio|accident)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(mor[ts]*|precipitar|defuncio|accident)/i", $rsst_ara)) &&
|
||||
(preg_match("/( ?!(Podem|Sumar|tomata) )/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Successos";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
// elseif(preg_match("/(Casa\sBlanca|cimera|Marroc|[Pp]alestin|[Uu]crain[esa]*|Brasil|Xina|Ira[nianes]+|Argent[inaes]+|EUA|Estats\sUnits|[Ii]srael[ia]|Afghanistan|Afric[ans]+|Rus[eiaso]+|Peru[anes]*]|Washington)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(mon|EUA|Casa\sBlanca|cimera|Marroc|Israel|[Pp]alestin|Ucraïn[esa]+|Brasil|Xina|Iran[ianes]*|Argent[inaes]+|EUA|Estats\sUnits|Israel[ia]*|Afghanistan|Afric[ans]+|Rus[eiaso]+|Peru[anes]*]|Washington|Siria|Israel|Palestin[sae]+|Brasil|America|Europa|Asia|Oceania|Pakistan|Austria)/i", $rsst_ara))&&
|
||||
// elseif( (preg_match("/(mon|Europ[ea]+|EUA|Estats\sUnits|Casa\sBlanca|França|Marroc|Israel|Palesti[nas]*|Ucraïn[esa]+|Rus[iaes]+|Xina|Iran[ianes]*|Argent[inaes]+|Afghanistan|Afric[anes]+|Peru[anes]*]|Siria|Brasil|America|Europa|Asia|Oceania|Africa)/i", $rsst_ara))&&
|
||||
elseif( (preg_match("/(mon)/", $rsst_ara))&&
|
||||
(preg_match("/^(?:(?!poliesportiu)(?!plusmarca)(?!esport)(?!Moncofa)(?!Montan)(?!Montixelvo)(?!testimoni)(?!monument)(?!mon[az]+).)*$/i", $rsst_ara)) ) {
|
||||
// elseif( (preg_match("/(mon)/", $rsst_ara))&&
|
||||
(preg_match("/( ?!Montan[tejos]+|Mona\sde\sPasqua|Mona)/", $rsst_ara)) ) {
|
||||
|
||||
// (preg_match("/( ?!Montan[tejos]+|Mona\sde\sPasqua|Mona)/", $rsst_ara)) ) {
|
||||
$etiqueta = "#Món";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(covid|pandemia|OMS)/", $rsst_ara)){
|
||||
$etiqueta = "#Món #Salut";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Pentagon|dron|caça|missil|atac|guerra|batalla|atac|tropes|alto\sel\foc|treva|Zelenski|Putin|Ucraïn[esa]+)i/", $rsst_ara)){
|
||||
$etiqueta = "#Món #Guerra";
|
||||
}
|
||||
elseif(preg_match("/(Israel|Palestina|Hezbollah|Siria|mesquita|israelia[nes]*|palesti[nes]*|Proxim\sOrient)/", $rsst_ara)){
|
||||
elseif(preg_match("/(Liban|Gaza|Cisjordania|Israel|Palestina|Hamas|Hezbollah|Siria|mesquita|israelia[nes]*|Palesti[nes]*|Proxim\sOrient)/i", $rsst_ara)){
|
||||
$etiqueta = "#OrientPròxim";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(Rafah|palestina|UNRWA|Nacions\sUnides|guerra|morts|atac)/", $rsst_ara)){
|
||||
$etiqueta = "#OrientPròxim #Genocidi";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(abatut[s]*|atrapat|accident|mort|violent|victim[aes]+|feri[tdes]+)/", $rsst_ara)){
|
||||
}
|
||||
elseif( (preg_match("/(abatut[s]*|atrapat|accident|mort|violent|victim[aes]+|feri[tdes]+)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!militar)(?!eleccions)).*/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Món #Successos";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(defenses|Pentagon|dron|ofensiva|caça|missil|atac|guerra|batalla|atac|tropes|alto\sel\foc|treva|Zelenski|Putin|Russia|Ucrain[esa]+|kiiv)/i", $rsst_ara)){
|
||||
$etiqueta = "#Món #Guerra";
|
||||
}
|
||||
elseif(preg_match("/(Representants|[Pp]resident|ministre|IRA|[Pp]arlament)/", $rsst_ara)){
|
||||
$etiqueta = "#Món #Política";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(carrecs\sfederals|tribunal|judici|fiscal|jutge)/i", $rsst_ara)) ) {
|
||||
// (preg_match("/(?!.*(pastilla|tumor)).*/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Món #Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Botanic|estatutaris)/", $rsst_ara)){
|
||||
$etiqueta = "#Política";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(alerta\sclimatica|corredor\sverd|sostenible|medi\snatural|Transicio\sEcologica|emergencia\sclimatica)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(Reserva\sfederal|Banc|tipus|interes|tipus-d-interes)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!.*(pastilla|tumor)).*/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Món #Economia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(alerta\sclimatica|corredor\sverd|sostenible|medi\snatural|Transicio\sEcologica|emergencia\sclimatica|entorn[s]*\snatural[s]*)/", $rsst_ara)){
|
||||
$etiqueta = "#Món #MediAmbient";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(mor[ts]*|precipitar|defuncio|accident)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(mor[ts]*|precipitar|defuncio|accident)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?:(?!pastilla)(?!tumor)(?!tomata)(?!oposicio)).*/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Successos";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(google|tik\stok|instagram|facebook|twitter|whatsapp|linkedin|app[s]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Xarxes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(cine[astam]*|pel-licula|pel·licula|Filmoteca|Guerra\sde\sles\sGalaxies|rodatge|audiovisual|curtmetratge|llargmetratge)/", $rsst_ara)){
|
||||
$etiqueta = "#Cinema";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(Fiscalia|condem[adent]+|Tribunal|sentenci[aes]+|cassacio|CGPJ|Constitucional[s]*|jutg[esa])/", $rsst_ara)){
|
||||
elseif( (preg_match("/(Fiscalia|condem[adent]+|Tribunal|sentenci[aes]+|cassacio|CGPJ|Constitucional[s]*|jutg[esa])/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!prejudici)(?!esport)(?!israel).)*$/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(economia)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(economia)/i", $rsst_ara))&&
|
||||
(preg_match("/^(?:(?!esports).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Economia";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(TSJ[CV]*|Tribunal[s]*)/", $rsst_ara)){
|
||||
$etiqueta = "#Economia #Tribunals";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(hotel|turis[metas]+|estranger)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!vehicle|automobil)/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Economia #Turisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(ERTO|ERO|empresari|ocupacio|recessio|treballador|acomiadament|sindicat)/", $rsst_ara)){
|
||||
$etiqueta = "#Economia #Treball";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(antimonopoli|barril|Brent|petroli)/i", $rsst_ara)){
|
||||
$etiqueta = "#Economia #Energia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(govern|ministre|Brusselles)/i", $rsst_ara)){
|
||||
$etiqueta = "#Economia #Politica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(tik\stok|instagram|facebook|twitter|whatsapp|linkedin|app[s]*)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(tik\stok|instagram|facebook|twitter|whatsapp|linkedin|app[s]*|videojoc)/i", $rsst_ara)){
|
||||
$etiqueta = "#Xarxes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(pensions)/i", $rsst_ara)){
|
||||
$etiqueta = "#Política #Pensions";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(mor[t]*|precipitar|defuncio|accident)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(mor[tes]*|defuncio|accident)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!.*(moral))/i" ,$rsst_ara)) ){
|
||||
$etiqueta = "#Successos #Laboral";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(leucemia|fibrosi|encefalitis|cancer\sde|Parkinson|pediatr[aes]+|vacuna[cio]*|respiratori|grip|estreptococ|bronquiolitis|pandemia|malaltia|covid|neumonia|hospital[itz]*|sanita[tri]+|salut|infecci[ons]+)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(leucemia|fibrosi|encefalitis|cancer\sde|Parkinson|pediatr[aes]+|vacuna[cio]*|respiratori|grip|estreptococ|bronquiolitis|pandemia|malaltia|covid|neumonia|hospital[itz]*|sanita[tri]+|salut|infecci[ons]+|trastorn[s]*\salimentari|asma|immunitat|farmacia)/i", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!falles).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Salut";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(pandemia|covid|endemia)/", $rsst_ara)){
|
||||
$etiqueta = "#Sanitat #Salut";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif( (preg_match("/(abus|naufragi|rescat[entads]*|estaf[aen]+|danys\spersonals|violen[ciatment]|apunyala[atd]|exparella|atracador[s]\sde\sbanc|violencia\sde\sgenere|allau|atropell[adt]+|segrest[ador]|mor[ta]+|autopsi[aes]|cadaver[s]|mata|assassi[nsat]|detingu[tsdea]|polici[alse]|robatori[s]|accident|sinistre|atracament[sdora]|feri[tsdesa]+|homicidi|preso[nera]|violad[arcio]|incendi)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!esports)/", $rsst_ara)) ) {
|
||||
(preg_match("/^(?:(?!esports)(?![a-z]mata).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Successos";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(abus\ssexual|exparella|masclis[meta]|violencia\sde\sgenere|don[aes]+\sassassinad[aes]+|agressio|prostitu[ciobulta])/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(ministr[eas]|presiden[tcial]|antidemocratic)/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Política";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(gos[so]|animal[s])/", $rsst_ara)){
|
||||
$etiqueta = "#Successos #Animalisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(futbo[listae]+|pilot[aes]+|basquet|basket|Mundial|esport[istesa]*|entrenador[esa]*|tenis[taes]*|embarcacio|Ocean\sRace)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(esports|futbo[listae]+|pilot[aes]+|basquet|basket|Mundial|esport[istesa]*|entrenador[esa]*|tenis[taes]*|embarcacio|Ocean\sRace)/i", $rsst_ara)){
|
||||
$etiqueta = "#Esports";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(bas[kqu]et|basquet|basket)/i", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Bàsquet";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(futbol)/", $rsst_ara)){
|
||||
elseif( (preg_match("/(futbol)/", $rsst_ara)) &&
|
||||
(preg_match("/^(?:(?!golf[ista]*)(?!tennis).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Esports #Futbol";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(bicicleta|ciclisme)/i", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Ciclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(ocean|veler|embarcacio)/", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Nàutica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(F1|Formula\s1|Formula1)/", $rsst_ara)){
|
||||
$etiqueta = "#F1";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(rallie|Dakar)/", $rsst_ara)){
|
||||
$etiqueta = "#Automobilisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(tennis|tenis)/", $rsst_ara)){
|
||||
elseif(preg_match("/(tennis|tenis|Roland\sGarros|Open|Wimbledon|Faulcombridge)/", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Tennis";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(pilota|raspall|llargues)/", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Pilota";
|
||||
$ctrl = __LINE__;
|
||||
if(preg_match("/(retransmissions|partit\sentre)/", $rsst_ara)) {
|
||||
$etiqueta = "#Esports #PilotaÀPunt";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif(preg_match("/(mor[t]*)/i", $rsst_ara)){
|
||||
elseif( (preg_match("/(mor[t]*)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!.*(amor|moros\si\cristians|humor|mor[a-z]+|[a-z]+mor)).*/i", $rsst_ara)) ) {
|
||||
$etiqueta = "#Esports #Necrològica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(fall[aers]+)/i", $rsst_ara)){
|
||||
$etiqueta = "#Esports #Festes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif( (preg_match("/(oratge|llamp|hivern|primaver[als]+|estiu|tardor|nuvo[ls]+|calo[rsad]+|plu[jages]+|boir[aes]+|tempest[aes]+|neva[rtdaes]*|tronad[aes]+|pedregad[aes]+|grani[sda]+|ponent[ada]*|mestral)/i", $rsst_ara))&&
|
||||
(preg_match("/(?!manifestacio|Amazon|computa[ciodr]+)/", $rsst_ara)) ){
|
||||
//one of these string found
|
||||
elseif( (preg_match("/(oratge|llamp|hivern|primaver[als]+|estiu|tardor|nuvo[ls]+|calo[rsad]+|plu[jages]+|boir[aes]+|tempest[aes]+|neva[rtdaes]*|tronad[aes]+|pedregad[aes]+|grani[sda]+|ponent[ada]*|mestral|llebeig)/i", $rsst_ara))&&
|
||||
// (preg_match("/(?!.*(escola|sahrauis|manifestacio|Amazon|computa[ciodr]+|Comissio|Europ|operacio\seixida|festiu|droga|drogues)).*/", $rsst_ara)) ){
|
||||
(preg_match("/^(?:(?!Turisme)(?!festiu)(?!feminis)(?!escola)(?!saraui)(?!Amazon)(?!computa)(?!Comissio)(?!operacio\seixida)(?!droga)(?!drogues).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Oratge";
|
||||
$ctrl = __LINE__;
|
||||
if( (preg_match("/(errors|conductors|salut\smental|calor\sextrema|avis\sroig|Sanitat|salut)/i", $rsst_ara))&&
|
||||
// (preg_match("/(?!.*(escola|sahrauis|manifestacio|Amazon|computa[ciodr]+|Comissio|Europ|operacio\seixida|festiu|droga|drogues)).*/", $rsst_ara)) ){
|
||||
(preg_match("/^(?:(?!festiu)(?!feminis)(?!escola)(?!saraui)(?!Amazon)(?!computa)(?!Comissio)(?!operacio\seixida)(?!droga)(?!drogues).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Oratge #EmergènciaClimàtica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(gota\sfreda|DANA)/i", $rsst_ara))&&
|
||||
// (preg_match("/(?!.*(escola|sahrauis|manifestacio|Amazon|computa[ciodr]+|Comissio|Europ|operacio\seixida|festiu|droga|drogues)).*/", $rsst_ara)) ){
|
||||
(preg_match("/^(?:(?!festiu)(?!feminis)(?!escola)(?!saraui)(?!Amazon)(?!computa)(?!Comissio)(?!operacio\seixida)(?!droga)(?!drogues).)*$/im", $rsst_ara)) ) {
|
||||
$etiqueta = "#Oratge #GotaFreda";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
}
|
||||
elseif( (preg_match("/(Any|Cap\sd\sAny|Nadal|Betlem|loteria|cavalcada\sde\sReis)/", $rsst_ara)) &&
|
||||
(preg_match("/(?:(?!estiu)(?!tardor).)*$/im", $rsst_ara)) ){
|
||||
$etiqueta = "#Nadal2025";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
/** elseif(preg_match("/(Any|Cap\sd\sAny|Nadal|Betlem|loteria|cavalcada\sde\sReis)/", $rsst_ara)){
|
||||
//one of these string found
|
||||
$etiqueta = "#Nadal2022";
|
||||
return $etiqueta;
|
||||
} **/
|
||||
elseif(preg_match("/(migrant|immigrant|xenofob|magreb[ina]+)/i", $rsst_ara)){
|
||||
//one of these string found
|
||||
$etiqueta = "#Xenofòbia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(8M|[Ll]lei\sde\s[Ii]gualtat|LGTBI|8\sde\s[Mm]arç)/", $rsst_ara)){
|
||||
//one of these string found
|
||||
elseif( (preg_match("/(8M|[Ll]lei\sde\s[Ii]gualtat|LGTBI|8\sde\s[Mm]arç)/", $rsst_ara)) &&
|
||||
(preg_match("/(?!28M|28m)/", $rsst_ara)) ){
|
||||
$etiqueta = "#Feminisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(masclis[aemt]+|prosti[abciolut]+|maltractador)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(masclis[aemt]+|prosti[abciolut]+|maltracta[dorment]+)/i", $rsst_ara)){
|
||||
//one of these string found
|
||||
$etiqueta = "#Masclisme";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif( (preg_match("/(Medi\sAmbient|conservacionis[meta]|vegetacio|ecologi[castes]+|desseca[rntseda]+|pardal|aus|porc[sater]*|pingui|pei[xosca]*|Albufera|plat[jages]+|clima[ticolg]+|escalfament)/i", $rsst_ara)) &&
|
||||
(preg_match("/(?!Google)/", $rsst_ara)) ){
|
||||
(preg_match("/(?:(?!Google).)*$/i", $rsst_ara)) ){
|
||||
//one of these string found
|
||||
$etiqueta = "#Ecologia";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(google|tik\stok|instagram|facebook|twitter|whatsapp|linkedin|app[s]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Xarxes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Especial\sMagdalena|Especial\sFogueres|festes|festes\sfundacionals|romeria|mascletaes|focs\artificials|carnestoltes|gaiat[esra]+|falles|faller[a]*|fogueres\sdAlacant|bellesa\sdel\sfoc)/i", $rsst_ara)){
|
||||
elseif(preg_match("/(Especial\sMagdalena|Especial\sFogueres|festes|festes\sfundacionals|romeria|mascletaes|focs\artificials|carnestoltes|gaiat[esra]+|falles|faller[a]*|fogueres\sdAlacant|bellesa\sdel\sfoc|fogueres|Tomatina)/i", $rsst_ara)){
|
||||
$etiqueta = "#Festes";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(fosses\scomunes|victimes\sdel\sfranquisme|memoria\sdemocratics|Guerra\sCivil|franquisme)/i", $rsst_ara)){
|
||||
$etiqueta = "#MemòriaHistòrica";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Alacant[inaes]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Alacant";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Castello[necs]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#Castelló";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
elseif(preg_match("/(Valencia[nse]*)/i", $rsst_ara)){
|
||||
$etiqueta = "#València";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
/**
|
||||
elseif(preg_match("/(program[aescio]+)/i", $rsst_ara)){
|
||||
|
@ -434,8 +705,9 @@ function MstEtiquetes($rsst_ara) {
|
|||
|
||||
else {
|
||||
$etiqueta = "#Actualitat";
|
||||
$ctrl = __LINE__;
|
||||
}
|
||||
return $etiqueta;
|
||||
return $etiqueta." ".$ctrl;
|
||||
//final cadena
|
||||
}
|
||||
//final funció
|
||||
|
|
Loading…
Referencia en una nova incidència