New file |
0,0 → 1,160 |
<?php |
// Encodage : UTF-8 |
// +-------------------------------------------------------------------------------------------------------------------+ |
/** |
* Découpage |
* |
* Description : classe abstraite mettant en comun des expressions régulière pour le découpage des noms latins. |
* |
//Auteur original : |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright Tela-Botanica 1999-2009 |
* @licence GPL v3 & CeCILL v2 |
* @version $Id: Decoupage.class.php 1873 2009-03-31 10:07:24Z Jean-Pascal MILCENT $ |
*/ |
// +-------------------------------------------------------------------------------------------------------------------+ |
abstract class Decoupage { |
|
protected $min = '[a-z\x{E0}-\x{FF}\x{153}]';// Lettres minuscules : a à z et à à ÿ et œ |
protected $maj = "[A-Z'\x{C0}-\x{DF}\x{152}]";// Lettres majuscules : A à Z, ' et À à ß et Œ |
protected $hyb = '[+xX]'; |
|
protected $SupraSp;// Nom de type suprasp. |
protected $GenHy;// Hybride intergénérique |
protected $Gen;// Genre |
protected $Dou = '(?:\(\?\)|\?)';// Doute |
protected $Epi_cv;// Epithete de cultivar |
protected $Epi_nn_hy = '(?:nsp\.|)';// Epithète non nommé hybride |
protected $Epi_nn = '(?:sp\.[1-9]?|spp\.|)';// Epithète non nommé |
protected $Epi;// Epithete |
//------------------------------------------------------------------------------------------------------------// |
protected $Ran_ig = '[Ss]ect\.|subg(?:en|)\.|ser\.|subser\.';// Rang taxonomique infragénérique de type : sous-genre |
protected $Ran_ig_gr = 'gr\.';// Rang taxonomique infragénérique de type : groupe |
protected $Ran_ig_agg = 'agg\.';// Rang taxonomique infragénérique de type : aggrégat |
protected $Ran_bo_i1 = 'subsp\.';// Rang taxonomique infraspécifique de niveau 1 |
protected $Ran_bo_i2 = 'var\.|subvar\.';// Rang taxonomique infraspécifique de niveau 2 |
protected $Ran_bo_i3 = 'f\.|fa\.|fa|forma';// Rang taxonomique infraspécifique de niveau 3 |
protected $Ran_bo_i4 = 'race|prole|proles|prol\.';// Rang taxonomique infraspécifique de niveau 4 |
protected $Ran_bo;// Rang taxonomique infraspécifique botanique non hybride |
protected $Ran_hy_i1 = 'n-subsp\.|\[subsp\.\]|\[n-subsp\.\]';// Rang taxonomique infraspécifique hybride de niveau 1 |
protected $Ran_hy_i2 = '\[var\.\]|n-var\.|\[n-var\.\]';// Rang taxonomique infraspécifique hybride de niveau 2 |
protected $Ran_hy_i3 = '';// Rang taxonomique infraspécifique hybride de niveau 3 |
protected $Ran_hy_i4 = 'n-proles\.';// Rang taxonomique infraspécifique hybride de niveau 4 |
protected $Ran_hy;// Rang taxonomique infraspécifique hybridre |
protected $Ran_ht = 'convar\.|[cC]v\.';// Rang taxonomique horticole |
protected $Ran;// Rang taxonomique infraspécifique non hybride, hybride et horticole |
//------------------------------------------------------------------------------------------------------------// |
protected $Ini;// Initiale de prénoms |
protected $Pre;// Prénoms |
protected $Par = '(?i:de|des|le|la|de la|von|van|st\.|el)';// Particules |
protected $ParSsEs = "(?i:st\.-|d)";// Particules sans espace après |
protected $Nom; // Abreviation d'un nom d'auteur. Le "f." c'est pour "filius" et c'est collé au nom |
protected $NomSpe = '(?:[A-Z]\. (?:DC\.|St\.-Hil\.))|\(?hort\.\)?|al\.';// Prénom + nom spéciaux : "hort." est utilisé comme un nom d'auteur mais cela signifie "des jardins". "DC." est une exception deux majuscule suivi d'un point. |
protected $Int;// Intitulé d'auteurs (Prénom + Nom) |
//------------------------------------------------------------------------------------------------------------// |
protected $AutNo;// Intitulé auteur sans "ex", ni "&", ni "et", ni parenthèses |
protected $AutNoTa;// Intitulé auteur sans "ex", ni "&", ni "et" mais avec parenthèses possible pour la nomenclature |
protected $AutEx;// Intitulé auteur avec "ex" |
protected $et = '(?:&|et)'; |
protected $AutExEt;// Intitulé auteur avec "ex" et "&" ou "et" |
protected $AutEt;// Intitulé auteur avec "&" ou "et" et sans parenthèse spécifique à la nomenclature |
protected $AutEtTa;// Intitulé auteur avec "&" ou "et" et avec ou sans parenthèse spécifique à la nomenclature |
protected $AutBib;// Intitulés auteurs pour la biblio |
protected $AutInc = 'AUTEUR\?';// Intitulé auteur spéciaux pouvant être trouvés entre parenthèses |
protected $AutSpe;// Intitulé auteur spéciaux pouvant être trouvés entre parenthèses |
protected $AutSpeSe;// Intitulé auteur spéciaux type "sensu" |
protected $AutSpeTa;// Intitulé auteur spéciaux propre à la nomenclature |
protected $Aut;// Tous les intitulés auteurs possibles |
protected $Auteur;// Tous les intitulés auteurs possibles |
//------------------------------------------------------------------------------------------------------------// |
protected $ComEmend;// Commentaires nomenclaturaux |
protected $ComPp = 'p\.p\.';// Commentaires nomenclaturaux |
protected $Com;// Intitulé auteur spéciaux type "sensu" |
protected $ComNom = '\(?(?:hort\. non .*|sensu .*|auct\..*|comb\.\s*(?:nov\.|ined\.)|comb?\.\s*nov\.\s*provis\.|stat\.\s*provis\.|nov\.\s*stat\.|stat\.\s*nov\.|p\.p\.|emend\.)\)?'; |
//------------------------------------------------------------------------------------------------------------// |
protected $In;// In auteur |
protected $AneMoCo = 'janvier|fevrier|mars|avril|mai|juin|juillet|ao\x{FB}t|septembre|octobre|novembre|decembre'; //Mois devant l'année |
protected $AneMoAb = 'janv\.|f[e\x{E9}]v\.|sept\.|oct\.|d\x{E9}c\.'; //Mois devant l'année |
protected $AneBaSi = '(?:\d{4}|\d{4} ?\?|DATE \?)';// Date |
protected $AneBaCo = '(?:\d{4}-\d{4}|\d{4}-\d{2})';// Date |
protected $AneDo = '\?';// Doute |
protected $AneBa;// Date |
protected $AneSpe;// Date |
protected $Ane;// Date |
//------------------------------------------------------------------------------------------------------------// |
// Spécial BDNFF : |
protected $Date = ' \[.*\]'; |
protected $Num = '[0-9]|3\*|4\*';# Gestion des numéros de flore |
protected $NumAuteur;# Gestion des numéros de flore mélangés ou pas au nom d'auteur |
|
//------------------------------------------------------------------------------------------------------------// |
protected $BibBa;// Biblio de base : \x{B0} = ° \x{AB}\x{BB} = «» \x{26} = & |
protected $Bib;// Biblio de taxon |
protected $BibAu = '.+';// Biblio supplémentaire |
//------------------------------------------------------------------------------------------------------------// |
protected $ErrDet;// Biblio à exclure base |
//------------------------------------------------------------------------------------------------------------// |
protected $HomNon = 'non';// Homonymes à exclure : négation |
protected $HomBa;// Homonymes à exclure base |
protected $Hom;// Homonymes à exclure avec non et nec |
protected $HomCourt;// Homonymes à exclure avec non et nec avec expression régulière plus courte! |
//------------------------------------------------------------------------------------------------------------// |
protected $Inf = '.*';// Informations supplémentaires |
|
public function __construct() |
{ |
//mb_internal_encoding('UTF-8'); |
//mb_regex_encoding('UTF-8'); |
//setlocale(LC_ALL, 'fr-fr'); |
|
$this->SupraSp = '(?:'.$this->maj.$this->min.'+|'.$this->maj.$this->min.'+-'.$this->maj.$this->min.'+)';// Nom de type suprasp. |
$this->GenHy = "[Xx] $this->SupraSp";// Hybride intergénérique |
$this->Gen = "$this->SupraSp|$this->GenHy"; |
$this->Epi_cv = "$this->maj.(?:$this->min|-)+";// Epithete de cultivar |
$this->Epi_nn = $this->Epi_nn.$this->Epi_nn_hy; |
$this->Epi = "(?:(?:$this->min|-|')+|$this->Epi_nn)";// Epithete |
|
$this->Ran_ig = $this->Ran_ig.'|'.$this->Ran_ig_gr; |
$this->Ran_bo = "$this->Ran_bo_i1|$this->Ran_bo_i2|$this->Ran_bo_i3|$this->Ran_bo_i4";// Rang taxonomique infraspécifique botanique non hybride |
$this->Ran_hy = "$this->Ran_hy_i1|$this->Ran_hy_i2|$this->Ran_hy_i3|$this->Ran_hy_i4";// Rang taxonomique infraspécifique hybridre |
$this->Ran = "(?:$this->Ran_ig|$this->Ran_bo|$this->Ran_hy|$this->Ran_ht)";// Rang taxonomique infraspécifique non hybride, hybride et horticole |
|
$this->Ini = '(?:'.$this->maj.'[.]|'.$this->maj.$this->min.'+[.]?)';// Initiale de prénoms |
$this->Pre = $this->Ini.'{1,3}|'.$this->Ini.'[\- ]'.$this->Ini;// Prénoms |
$this->Nom = '(?:'.$this->maj."'".$this->maj.'|'.$this->maj.'|'.$this->maj.$this->min."+'".$this->min.'+)'.$this->min.'*[.]?(?: ?f\.|)'; |
$this->Int = "(?:(?:$this->Pre ?|)(?:$this->Par |$this->ParSsEs|)(?:$this->Nom|$this->Nom".'[\- .]'."$this->Nom)|$this->NomSpe)";// Intitulé d'auteurs (Prénom + Nom) |
|
$this->AutNo = "$this->Int";// Intitulé auteur sans "ex", ni "&", ni "et", ni parenthèses |
$this->AutNoTa = "$this->AutNo|$this->NomSpe $this->Int|\($this->Int\) $this->Int";// Intitulé auteur sans "ex", ni "&", ni "et" mais avec parenthèses possible pour la nomenclature |
$this->AutEx = "\($this->Int\) $this->Int ex $this->Int|\($this->Int ex $this->Int\) $this->Int|$this->Int ex $this->Int";// Intitulé auteur avec "ex" |
$this->AutExEt = "$this->Int $this->et $this->Int ex $this->Int|$this->Int $this->et $this->Int ex $this->Int $this->et $this->Int|$this->Int ex $this->Int $this->et $this->Int|\($this->Int ex $this->Int $this->et $this->Int\) $this->Int|\($this->Int ex $this->Int\) $this->Int $this->et $this->Int|\($this->Int $this->et $this->Int\) $this->Int ex $this->Int|$this->NomSpe $this->Int ex $this->Int";// Intitulé auteur avec "ex" et "&" ou "et" |
$this->AutEt = "$this->Int $this->et $this->Int";// Intitulé auteur avec "&" ou "et" et sans parenthèse spécifique à la nomenclature |
$this->AutEtTa = "\($this->Int\) $this->Int $this->et $this->Int|\($this->Int $this->et $this->Int\) $this->Int|$this->AutEt";// Intitulé auteur avec "&" ou "et" et avec ou sans parenthèse spécifique à la nomenclature |
$this->AutBib = "(?:$this->AutNo|$this->AutEt)";// Intitulés auteurs pour la biblio |
$this->AutSpe = "(?:sensu |)auct\.|auct\. mult\.|$this->AutInc";// Intitulé auteur spéciaux pouvant être trouvés entre parenthèses |
$this->AutSpeSe = "sensu $this->AutBib";// Intitulé auteur spéciaux type "sensu" |
$this->AutSpeTa = "$this->AutSpe|\((?:$this->AutSpe)\)|$this->AutSpeSe";// Intitulé auteur spéciaux propre à la nomenclature |
$this->Aut = "(?:$this->AutExEt|$this->AutEx|$this->AutEtTa|$this->AutSpeTa|$this->AutNoTa)";// Tous les intitulés auteurs possibles |
$this->Auteur = $this->Int.'|'.$this->Int.' '.$this->et.' '.$this->Int.'|(?:'.$this->Int.', )+'.$this->Int.' '.$this->et.' '.$this->Int;// Intitulé auteur avec "&" ou "et"; |
|
$this->ComEmend = "emend\. $this->AutBib";// Commentaires nomenclaturaux |
$this->Com = "$this->ComEmend|$this->ComPp";// Intitulé auteur spéciaux type "sensu" |
|
$this->In = "[iI]n $this->AutBib";// In auteur |
$this->AneBa = "$this->AneBaSi|$this->AneBaCo";// Date |
$this->AneSpe = "(?:$this->AneBa ?\[$this->AneBa\]|(?:$this->AneMoCo|$this->AneMoAb) $this->AneBaSi|$this->AneBaSi $this->AneBaSi)";// Date |
$this->Ane = "$this->AneBa||$this->AneDo|$this->AneSpe";// Date |
|
$this->BibBa = "(?:$this->maj$this->min*[.]?|in|hort\.)(?:$this->min*[.]?|[\d\/\- ,()'\x{B0}\x{26}\x{AB}\x{BB}[\]?])*";// Biblio de base : \x{B0} = ° \x{AB}\x{BB} = «» \x{26} = & |
$this->Bib = "([^:]+):(.+?)\(($this->Ane)\)";// Biblio de taxon |
|
$this->ErrDet = "($this->AutSpe,? non $this->Aut): ($this->Bib;?)+";// Biblio à exclure base |
|
$this->HomBa = "$this->Aut \($this->Ane\)";// Homonymes à exclure base |
$this->Hom = "$this->HomNon $this->HomBa(?: nec $this->HomBa)*?";// Homonymes à exclure avec non et nec |
$this->HomCourt = "$this->HomNon .+?(?: nec .+?)*?";// Homonymes à exclure avec non et nec avec expression régulière plus courte! |
|
$this->NumAuteur = $this->Num.'|(?:(?:'.$this->Num.'|'.$this->Auteur.'), )+(?:'.$this->Num.'|'.$this->Auteur.')';# Gestion des numéros de flore mélangés ou pas au nom d'auteur |
} |
} |
?> |