OpenRefine/Version imprimable
Une version à jour et éditable de ce livre est disponible sur Wikilivres,
une bibliothèque de livres pédagogiques, à l'URL :
https://fr.wikibooks.org/wiki/OpenRefine
Introduction[modifier | modifier le wikicode]
Blender • Firefox • Gimp, Quézaco ? • Inkscape • K3b • Kdenlive • MediaWiki pour débutants • LibreOffice et Apache OpenOffice • Pidgin • Scribus • Mozilla Thunderbird
un livre appartenant à l'étagère Informatique de Wikilivres.
Ce wikilivre sur le logiciel libre OpenRefine souhaite réunir l'ensemble des informations en français sur l'utilisation de ce dernier.
Il existe déjà sur Internet beaucoup de tutoriels et de marches à suivre sur OpenRefine, ce wikilivre n'a pas pour but d'en créer des nouveaux mais plutôt de répertorier ceux-ci et parfois d'en donner des résumés qui en rappelle les points essentiels.
En effet, une grande partie des informations proviennent des excellents sites et notes sur le sujet de Maïwenn Bourdic [1] et Mathieu Saby [2], ainsi que des si précieux tutoriels video réalisés par Ettore Rizza [3].
Les informations devront permettre à tous les publics, des personnes débutantes à celles expertes, d'y trouver des informations.
Sommaire[modifier | modifier le wikicode]
Historique de ce wikilivre[modifier | modifier le wikicode]
Le projet a été initié par 2le2im-bdc en novembre 2019 mais le projet souhaite être mené de façon collective.
Liste des contributrices et contributeurs souhaitant être identifié.e.s : 2le2im-bdc, VIGNERON, à compléter.
Références[modifier | modifier le wikicode]
- ↑ Maïwenn Bourdic, « OpenRefine, "Excel aux hormones" pour nettoyage de données" », sur https://www.patrimoine-et-numerique.fr, (consulté le 2 décembre 2019).
- ↑ Mathieu Saby, « Nettoyer, préparer et transformer des données avec Openrefine : des premiers pas aux usages avancés », (consulté le 7 mai 2020).
- ↑ Ettore Rizza, « Tutoriels video sur OpenRefine », sur https://www.youtube.com (consulté le 2 décembre 2019).
Import des données[modifier | modifier le wikicode]
Import de données[modifier | modifier le wikicode]
La première étape de tout projet est d'importer les données sur lesquels on veut travailler. OpenRefine accepte un grand nombre de formats de données différents : TSV, CSV, *SV, Excel (.xls et .xlsx), JSON, XML, RDF en tant XML. OpenRefine dispose de plusieurs façons de fournir ces formats, à partir d'un fichier local, d'une adresse Internet (URL), par simple copier-coller, en se connectant à une base de données (PostgreSQL, MySQL ou MariaDB) ou d'un tableur Google.
Format XML[modifier | modifier le wikicode]
Selon Maïwenn Bourdic : "Il est possible d'importer un fichier XML qu'OpenRefine va transformer en tableau (en gros, une balise = une colonne). Dans le fichier XML à importer, enlever d'abord tout ce qui concerne la zone de déclaration. Pour un fichier XML-EAD par exemple, il est possible d'alléger le contenu du <archdesc> et ne garder que le contenu du <dsc> (en conservant quand même un fichier xml valide avec toutes les balises bien fermées)" [1].
Références[modifier | modifier le wikicode]
- ↑ Maïwenn Bourdic, « OpenRefine, "Excel aux hormones" pour nettoyage de données" », sur https://www.patrimoine-et-numerique.fr, (consulté le 2 décembre 2019).
Nettoyage des données[modifier | modifier le wikicode]
Une fois l'analyse des données effectuées, on peut se lancer dans le nettoyage de celles-ci.
Il existe au moins deux manières principales de nettoyer des données : travailler individuellement sur chacune de celles-ci ou de faire des modifications en masse. OpenRefine permet les deux mais évidemment son principal avantage réside dans les transformations de masse.
Modifications individuelles[modifier | modifier le wikicode]
Chaque cellule du tableur affiché dans OpenRefine peut être modifiée individuellement. Cela est aussi possible sur les facettes elles-mêmes.
Ligne[modifier | modifier le wikicode]
Ajouter une ligne dans OpenRefine c'est possible.
- Choisir la colonne dans laquelle se trouve l'information à répartir sur deux lignes;
- Puis "Éditer les cellules"->"Diviser les cellules multivariées"
- Définir le type de séparateur qui opérera la séparation.
Journal des actions[modifier | modifier le wikicode]
OpenRefine offre dans la zone de gauche de l'interface de traitement des données un journal des actions et transformations opérées. Cela permet de revenir en tout temps en arrière, y compris jusqu'à la première action.
Ce journal des actions peut aussi être exporté (via "Extraire") afin de pouvoir être rejoué (via "Appliquer") tel quel sur un nouveau ensemble de données. Cette fonctionnalité est très pratique si on travaille sur plusieurs fichiers similaires ou sur plusieurs versions d'un même fichier (par exemple fichier mis à jour régulièrement).
Modifications en masse[modifier | modifier le wikicode]
Groupe[modifier | modifier le wikicode]
À partir d'une liste de termes obtenus par la demande d'une facette, ou simplement en choisissant Éditer les cellules->Grouper et éditer, OpenRefine offre une proportion de regroupement des valeurs par similitude. À partir de cette visualisation, il est possible de procéder à des fusions de termes sous une même valeur. Voir à ce sujet la vidéo n°1 d'introduction de 2011.
Chaînes de caractères[modifier | modifier le wikicode]
Il existe de nombreuses fonctions GREL pour manipuler les chaînes de caractères :
- pour les découper (
trim(c) strip(c) chomp(c1, c2) substring(c, 0, 10) split(c1, c2)
), - pour changer la casse (
toLowercase(c) toUppercase(c) toTitlecase(c)
), - pour calculer ou compter la chaîne (
length(c) contains(c1, c2)
), - etc.
Dates[modifier | modifier le wikicode]
Typer une colonne en date[modifier | modifier le wikicode]
Transformer le format d'une colonne en date (de type aaaa-mm-jjT00:00:00Z, soit jusqu'à l'heure !) permet d'utiliser la facette chronologique, et donc la jauge temporelle.
Pour ce faire : Clic sur la colonne -> Éditer les cellules -> Transformations courantes -> En date.
Un conseil : dupliquer la colonne date pour faire la manipulation sur un double...
Source : le blog de Maïwenn Bourdic[1].
Changer le type de date[modifier | modifier le wikicode]
Clic sur la colonne -> Éditer les cellules -> Transformer -> la commande GREL :
value.toDate('yyyy-MM-dd','MMM-yy').toString('dd-MM-yyyy')
Source : le blog de Maïwenn Bourdic[2].
GREL[modifier | modifier le wikicode]
GREL est un acronyme qui signifie General Refine Expression Language.
Voir la documentation officielle et aussi le mémo de Mathieu Saby[3]
La base[modifier | modifier le wikicode]
- Les formules GREL ne commence pas par un signe = contrairement à celles des tableurs habituels.
- La formule n'est pas stockée dans la cellule. C'est le résultat qui l'est.
- value appelle la valeur de la colonne d'où est partie la requête.
- cells['nom de la colonne'] ou cells.nom_colonne permet d'appeler n'importe quel valeur sur une autre colonne.
- les transformations peuvent être enchaînées par un point.
- les transformations peuvent encapsulées par des parenthèses (seule possibilité pour les transformations conditionnelles).
Tiré en partie du mémo de Mathieu Saby[3],
Transformations primaires[modifier | modifier le wikicode]
Comme le dit Mathieu Saby dans son mémo[3], Les formules GREL permette de réaliser les opérations simples comme :
- concaténer des valeurs : "a"+"b"->ab
- calculer sur les nombres grâce aux opérateurs + - / *: 1+2->3
- comparer grâce aux opérateur : ==,!==,<,>,=>,<=
Transformations directes[modifier | modifier le wikicode]
Mathieu Saby distingue[3] les formules GREL de fonction et celles de contrôle, nous les avons distingué ici entre celles de transformations directes et celles de transformations conditionnelles, recoupant plus ou moins la même distinction.
premier modèle[modifier | modifier le wikicode]
Le premier modèle s'écrit fonction(paramètres)[3].
- forEach(value.split("-"), v, v.toTitlecase()).join("-") pour appliquer une majuscule sur les initiales à un nom composé, par exemple : nadine-josette[4].
- value(1,5) qui signifie reprendre les valeurs ayant la position de 1 à 5 dans la nouvelle colonne[5].
- value + " " + cells["nom de la colonne"].value[6] permet de concaténer les valeurs de deux colonnes dans une troisième.
second modèle[modifier | modifier le wikicode]
Le second modèle s'écrit Paramètre1.fonction(Paramètre2)[3].
- value.log()[7].
- value.parseJson().responseData.language[8].
- value.replace("quelque chose","par quelque chose d'autre")[7]>.
- value.replace(value,"par quelque chose d'autre") permet de créer une nouvelle colonne en fonction d'une existante avec une valeur nouvelle.
value.replace(/\n/, " | ")
remplace (via REGEX) les retours à la ligne par un pipe (à vérifier).
- value.substring(2) qui signifie reprendre tous les caractères moins ceux ayant les deux premières positions[5].
- value.toDate('yyyy-MM-dd','MMM-yy').toString('dd-MM-yyyy') pour changer le type de date[2].
Transformations conditionnelles[modifier | modifier le wikicode]
- if(cells["titre d'une autre colonne"].value, value + "un texte", value) qui nécessite que l'autre colonne dispose de valeur de requête vrai ou faux. Si c'est le cas alors on peut utiliser if (si) le valeur est vraie alors ajoute au texte existant un texte, sinon on laisse la valeur telle quelle[5].
- if(isBlank(cells["colonne 1"].value), " - ", cells["colonne 1"].value) + " - " + if(isBlank(cells["colonne 2"].value), " - ", cells["colonne 2"].value) + " - " + if(isBlank(cells["colonne 3"].value), " - ", cells["colonne 3"].value) + " - " + if(isBlank(cells["colonne 4"].value), " - ", cells["colonne 4"].value) pour concatener le contenu de 4 colonnes dont certaines ne disposent pas de valeur[9].
- "film de "+if(isBlank(cells["Réal1"].value), " ", cells["Réal1"].value) + if(isBlank(cells["Réal2"].value), "", ", "+cells["Réal2"].value) + if(isBlank(cells["Réal3"].value), "", ", "+cells["Réal3"].value)+ if(isBlank(cells["Réal4"].value), "", ", "+cells["Réal4"].value)+ if(isBlank(cells["Réal5"].value), "", ", "+cells["Réal5"].value)+ if(isBlank(cells["Réal6"].value), "", ", "+cells["Réal6"].value)+ if(isBlank(cells["Réal7"].value), "", ", "+cells["Réal7"].value)
- not(value.startsWith("quelque chose"))[5].
- with(value.parseJson()[0],pair, pair.lat + ',' + pair.lon)[8].
- filter
- forEach
- forEachIndex
- forRange
- IsBlank
- IsNonBlank
- IsNull
- IsNotNull
- IsNumeric
- IsError
- forNonBlank
Références[modifier | modifier le wikicode]
- ↑ Maïwenn Bourdic, « Typer une colonne en date », sur https://www.patrimoine-et-numerique.fr, (consulté le 6 décembre 2019).
- ↑ 2,0 et 2,1 Maïwenn Bourdic, « Changer le type de date », sur https://www.patrimoine-et-numerique.fr, (consulté le 7 décembre 2019).
- ↑ 3,0 3,1 3,2 3,3 3,4 et 3,5 Mathieu Saby, « Programmer dans Openrefine avec GREL », sur https://fr.slideshare.net, (consulté le 11 février 2020).
- ↑ Merci à Ettore Rizza de nous avoir fourni l'expression.
- ↑ 5,0 5,1 5,2 et 5,3 Voir video 2 de 2011
- ↑ (en) Illionois University Library, « Combining Cell Values », sur https://guides.library.illinois.edu/openrefine, (consulté le 28 janvier 2020).
- ↑ 7,0 et 7,1 Voir video 1 de 2011
- ↑ 8,0 et 8,1 Voir video 3 de 2011
- ↑ Maïwenn Bourdic, « Concatener », (consulté le 28 janvier 2020).
Réconciliation et enrichissement[modifier | modifier le wikicode]
Avec Wikidata[modifier | modifier le wikicode]
Réconciliation / Enrichissement[modifier | modifier le wikicode]
- Voir la documentation en ligne sur Wikidata.
- Voir la procédure proposée par Mathieu Saby [1].
- Voir la procédure proposée par Maiwenn Bourdic [2].
Pour ajouter un service de réconciliation, voir la documentation officielle. En introduisant l'URL https://wdreconcile.toolforge.org/en/api il est possible en modifiant l'acronyme avant /api de choisir la langue que l'on souhaite[3]. Visiblement, il semble plus performant d'utiliser le lien suivant:https://wikidata.reconci.link/en/api
[4].
Création de nouveaux éléments Wikidata à partir de Openrefine[modifier | modifier le wikicode]
Attention : lorsque vous souhaitez créer des éléments totalement nouveaux dans Wikidata à partir de Openrefine, il faut faire attention aux points suivants [5] :
- Si vous lancez une réconciliation sur une colonne comportant que des éléments nouveaux en suivant la procédure Réconcilier->Action>"Créer un nouveau sujet pour chaque cellule". Cette action fonctionne et affiche 100% d'élément nouveaux. Mais lorsque l'on souhaite éditer le schéma en vue de leur import dans Wikidata, on n'arrive pas à sélectionner cette colonne pour en-tête d'élément (le premier champs à spécifier). Elle est inactive au sens de Wikidata.
- Le problème vient du fait que Openrefine ne sait pas avec quel service externe on veut les réconcilier et Wikidata ne les reconnaît dès lors pas.
- Pour contourner, ce problème, on peut faire deux choses:
- soit lancer une réconciliation"classique" tout d'abord en sélectionnant Wikidata, puis dans un second temps lancer l'action "Créer un nouveau sujet pour chaque cellule".
- soit choisir Réconcilier->"Utiliser les valeurs comme identifiants", en choisissant Wikidata.
- Dans les deux cas, Wikidata sera identifié et la colonne "valide" pour sa sélection dans le schéma.
- Il existe un ticket de développement d'Openrefine qui documente cette difficulté.
Via Quickstatements[modifier | modifier le wikicode]
Openrefine propose d'exporter le schéma de réconciliation dans un format (.txt) lisible par Quickstatements. Voir d:Wikidata:Tools/OpenRefine/Editing/Uploading#Uploading_with_QuickStatementsdocumentation en ligne.
Cette démarche a les avantages suivants :
- Elle permet de relire l'entièreté des données avant l'import;
- Elle permet suivi détaillé de l'avancée des imports au contraire d'Openrefine.
Voir aussi[modifier | modifier le wikicode]
- la documentation sur les pages d'aide de Wikidata.
- Gautier Poupeau, « Aligner vos données avec Wikidata grâce à l'outil Open Refine », sur https://medium.com, (consulté le 4 décembre 2019).
- Antoine Courtin, « “Réconcilier” une liste de nom d’architectes avec Wikidata en utilisant OpenRefine », sur https://www.slideshare.net, (consulté le 7 décembre 2019).
Avec un CSV[modifier | modifier le wikicode]
Dans ce cas nous allons réconcilier en vue d'une normalisation nos données dans le projet Openrefine ouvert et des données externes dont nous disposons sous forme de fichier .csv.
Nous allons effectuer pour cela un fuzzy matching. La manœuvre va nous permettre de réconcilier des données dont l'orthographe est plus ou moins proche et de récupérer le cas échéant leurs identifiants externes. Pour tout autre enrichissement, il faudra se tourner dans un second temps vers d'autres procédures.
La plupart des informations pour réaliser cela ont été tirées du tutoriel video sur ce sujet réalisé par Ettore Rizza sur le sujet [6].
Réconciliation[modifier | modifier le wikicode]
- Lancer Openrefine;
- Créer un projet OpenRefine à partir de nos données A de base;
- Créer un dossier de travail sur notre ordinateur;
- Créer un fichier .csv avec nos données B avec lesquelles on veut réconcilier les données A. Le fichier doit dispose de deux colonnes, l'une avec un identifiant unique (ex.1, 2, 3 etc.) et une seconde avec les valeurs que l'on souhaite réconcilier. Enregistrer ce fichier dans le dossier de travail;
- Télécharger le plugin d'OpenRefine permettant le fuzzy matching [7] qui est sous la forme d'une archive JAVA;
- Enregistrer ce plugin dans le dossier;
- Activer le plugin au travers d'une invite de commande, à partir du dossier dans lequel l'archive JAVA a été déposée, au moyen de la commande suivante (sans les crochets) :
java -jar [nom de l'archive] [le nom de fichier de référence] [Nom de la colonne qui servira au matching] [Nom de la colonne où se trouve l'identifiant unique]
- Retourner au projet OpenRefine avec nos données A. Choisir la colonne que nous voulons réconcilier, dans l'en-tête de colonne choisir au moyen du petit triangle : Reconcilier->Démarrer la réconciliation->Ajouter un service standard puis indiquer l'adresse URL préciser sur la page du plugin (http://localhost:8000/reconcile)->Add Service->Start Reconciling;
- Le matching s'est effectué;
- Dans le cas de doute, le service propose des différents choix, nous devons alors effectuer un choix à la main de façon sérielle ou unique.
Enrichissement[modifier | modifier le wikicode]
Via l'application java permettant le fuzzy matching, on ne peut récupérer que l'identifiant de la valeur réconciliée. Voici comment procéder :
- Dans le projet OpenRefine avec nos données A à présent réconciliées avec les données B du fichier .csv, il faut choisir la colonne réconciliée, dans l'en-tête de colonne choisir au moyen du petit triangle : "Éditer la colonne"->"Ajouter une colonne en fonction de cette colonne" puis:
- Donner un "Nouveau nom de colonne";
- Introduire une expression GREL
cell.recon.match.id
.
Avec une API[modifier | modifier le wikicode]
Réconciliation[modifier | modifier le wikicode]
Enrichissement[modifier | modifier le wikicode]
Voir la procédure proposée par Mathieu Saby [8].
Enrichissement par jointure[modifier | modifier le wikicode]
Lorsque l'on dispose de données avec une clé de concordance absolument identique, il est alors possible de faire une jointure entre deux projets OpenRefine afin d'enrichir un projet par les données de l'autre.
La plupart des informations pour réaliser cela ont été tirées du tutoriel video sur ce sujet réalisé par Ettore Rizza sur le sujet [9].
Selon Ettore Rizza, il existerait au moins deux manière de faire une jointure dans OpenRefine, soit par un plugin soit par une commande GREL.
GREL[modifier | modifier le wikicode]
- Il faut ouvrir le projet A et le projet B dans OpenRefine;
- Dans le projet OpenRefine avec nos données A, il faut choisir la colonne qui servira de pivot entre les deux projets, dans l'en-tête de cette colonne choisir au moyen du petit triangle : "Éditer la colonne"->"Ajouter une colonne en fonction de cette colonne" puis dans l'interface qui s'ouvre alors:
- Donner un "Nouveau nom de colonne";
- Introduire cette expression GREL :
cell.cross("titre du projet B", "titre de la colonne pivot dans le projet B").cells["titre dans le projet B de la colonne contenant les données à rapatrier dans le projet A"].value[0]
. - Appuyer sur ok.
Plugin[modifier | modifier le wikicode]
Voir aussi[modifier | modifier le wikicode]
Maïwenn Bourdic, « Enrichir à partir d'un autre projet openrefine », sur https://www.patrimoine-et-numerique.fr, (consulté le 7 décembre 2019).
Références[modifier | modifier le wikicode]
- ↑ Mathieu Saby, « Réconcilier des données avec Wikidata », sur Nettoyer et préparer des données avec OpenRefine : atelier pour les journées du consortium MASA, 14 novembre 2018 (mise à jour le 19 novembre 2019) (consulté le 4 décembre 2019).
- ↑ Maïwenn Bourdic, « Enrichir depuis Wikidata », sur https://www.patrimoine-et-numerique.fr, (consulté le 7 décembre 2019).
- ↑ (en) « Reconciliation », sur OpenRefine : Documentation For Users, (consulté le 13 août 2020).
- ↑ (en) « New OpenRefine reconciliation service », sur Wikidata, (consulté le 18 septembre 2020).
- ↑ Je remercie Pintoch de m'avoir indiqué ces solutions et ces informations.
- ↑ Ettore Rizza, « Tuto Open refine : le fuzzy matching », sur https://www.youtube.com, (consulté le 2 décembre 2019).
- ↑ Reconcile-csv : http://okfnlabs.org/reconcile-csv/#download
- ↑ Mathieu Saby, « Enrichissement de données à partir d’API », sur Nettoyer et préparer des données avec OpenRefine : atelier pour les journées du consortium MASA, 14 novembre 2018 (mise à jour le 19 novembre 2019) (consulté le 4 décembre 2019).
- ↑ Ettore Rizza, « Tuto Open Refine : jointure entre deux projets (VLOOKUP) », sur https://www.youtube.com, (consulté le 2 décembre 2019).
Export des données[modifier | modifier le wikicode]
La fonction d'export se trouve en haut à droit de l'interface de traitement.
Il existe de nombreux format d'export depuis OpenRefine. On peut utiliser les modèles déjà implémenter ou en établir un à travers de l'outil de modélisation.
Modèles en place[modifier | modifier le wikicode]
Modélisation[modifier | modifier le wikicode]
Voir un exemple dans la video 2 de 2011.
Voir aussi[modifier | modifier le wikicode]
La documentation officielle[modifier | modifier le wikicode]
- (en) « OpenRefine », sur https://github.com (consulté le 17 août 2020).
Publications[modifier | modifier le wikicode]
Billet de blog[modifier | modifier le wikicode]
- Maïwenn Bourdic, « OpenRefine, "Excel aux hormones" pour nettoyage de données" », sur https://www.patrimoine-et-numerique.fr, (consulté le 2 décembre 2019).
Site internet[modifier | modifier le wikicode]
- Mathieu Saby, « Nettoyer et préparer des données avec OpenRefine : atelier pour les journées du consortium MASA », 14 novembre 2018 (mise à jour le 19 novembre 2019) (consulté le 2 décembre 2019).
- (en) « RefinePro Knowledge Base for OpenRefine » (consulté le 27 janvier 2020)
- (en) Illionois University Library, « OpenRefine », sur https://guides.library.illinois.edu, (consulté le 28 janvier 2020).
Diaporama[modifier | modifier le wikicode]
- Mathieu Saby, « Nettoyer et préparer des données avec OpenRefine : formation URFRIST PACA », sur https://fr.slideshare.net, (consulté le 11 février 2020).
Licence de documentation libre GNU[modifier | modifier le wikicode]
Résumé[modifier le wikicode]
La licence de documentation libre GNU (GNU Free Documentation License) est une licence produite par la Free Software Foundation. Cette licence a pour but de permettre la diffusion de contenu libre.
L'objet de cette Licence est de rendre tout manuel, livre ou autre document écrit « libre » au sens de la liberté d'utilisation, à savoir : assurer à chacun la liberté effective de le copier ou de le redistribuer, avec ou sans modifications, commercialement ou non.
Attention, contenu libre ne veut pas dire domaine public. Les différents créateurs de documents sous licence GFDL restent propriétaire de leurs écrits ou de leurs images. La licence GNU requiert que les auteurs gardent le crédit de leurs contributions. Pour cette raison, toute utilisation de document sous licence GFDL doit mentionner la source de ce contenu (par exemple, soit en créditant l'organisation d'où origine le document ou encore le document directement).
- en français (traduction non officielle, version 1.1): http://cesarx.free.fr/gfdlf.html
- version officielle en anglais: http://www.gnu.org/copyleft/fdl.html
Texte intégral[modifier le wikicode]
GNU Free Documentation License Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.