Download Complete Ontologies with Python: Programming OWL 2.0 Ontologies with Python and Owlready2 1st Edition Lamy Jean-Baptiste PDF for All Chapters
Download Complete Ontologies with Python: Programming OWL 2.0 Ontologies with Python and Owlready2 1st Edition Lamy Jean-Baptiste PDF for All Chapters
com
https://ebookmeta.com/product/ontologies-with-python-
programming-owl-2-0-ontologies-with-python-and-
owlready2-1st-edition-lamy-jean-baptiste/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/ontologies-with-python-programming-
owl-2-0-ontologies-with-python-and-owlready2-1st-edition-lamy-jean-
baptiste-2/
ebookmeta.com
https://ebookmeta.com/product/python-programming-with-design-
patterns-1st-edition-james-cooper/
ebookmeta.com
https://ebookmeta.com/product/learn-tensorflow-2-0-implement-machine-
learning-and-deep-learning-models-with-python-1st-edition-pramod-
singh/
ebookmeta.com
https://ebookmeta.com/product/handbook-of-polish-czech-and-slovak-
holocaust-fiction-works-and-contexts-1st-edition-elisa-maria-hiemer-
editor/
ebookmeta.com
Archaeology of Religion in South Asia Buddhist Brahmanical
and Jaina Religious Centres in Bihar and Bengal c AD 600
1200 1st Edition Birendra Nath Prasad
https://ebookmeta.com/product/archaeology-of-religion-in-south-asia-
buddhist-brahmanical-and-jaina-religious-centres-in-bihar-and-bengal-
c-ad-600-1200-1st-edition-birendra-nath-prasad/
ebookmeta.com
https://ebookmeta.com/product/the-woman-with-the-ring-1st-edition-
jessica-gadziala/
ebookmeta.com
Falling for the Wolf The fated 1 1st Edition Lilura Sloane
https://ebookmeta.com/product/falling-for-the-wolf-the-fated-1-1st-
edition-lilura-sloane/
ebookmeta.com
https://ebookmeta.com/product/rise-sin-and-secrets-0-5-1st-edition-
various-authors/
ebookmeta.com
https://ebookmeta.com/product/hamiltonian-monte-carlo-methods-in-
machine-learning-tshilidzi-marwala/
ebookmeta.com
Singularity Now The Artificial Intelligence Timeline A
reader s and investor s guide to the technological event
horizon artificial intelligence automation robotics and
beyond February 2017 1st Edition Singularity Now
https://ebookmeta.com/product/singularity-now-the-artificial-
intelligence-timeline-a-reader-s-and-investor-s-guide-to-the-
technological-event-horizon-artificial-intelligence-automation-
robotics-and-beyond-february-2017-1st-edition/
ebookmeta.com
Lamy Jean-Baptiste
Standard Apress
Trademarked names, logos, and images may appear in this book. Rather
than use a trademark symbol with every occurrence of a trademarked
name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark. The use in this publication
of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of
opinion as to whether or not they are subject to proprietary rights.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, express or implied, with respect to the material
contained herein or for any errors or omissions that may have been
made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business
Media New York, 1 New York Plaza, Suite 4600, New York, NY 10004-
1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-
ny@springer-sbm.com, or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM
Finance Inc is a Delaware corporation.
Acknowledgments
I would like to thank Moushin Gaouar, Appoh Kouame, and Adrien
Basse for being among the first to test Owlready, as well as my friends
and/or colleagues Rosy Tsopra, Gaoussou Camara, Antoine Gellman,
Patricia Nadjar, Antoine Saab, David Perlmutter, Arnaud Rosier, Karima
Sedki, Fadi Badra, Jordon Ritchie, Brandon Welch, Lina Soualmia, and
Marie-Christine Jaulent for discussions on ontologies, long or short, and
sometimes even before the existence of Owlready.
I also thank the ANSM (Agence Nationale de Sécurité du
Médicament et des produits de santé, French drug agency) for having
funded the VIIIP project (Integrated Visualization of Information on
Therapeutic Innovation), during which Owlready was born (at the time
under the name “Ontopy”).
Finally, I thank all members of the Owlready forum on Nabble (
http://owlready.8326.n8.nabble.com/ ) for their requests
and their advice, which greatly influenced the content of this book.
Table of Contents
Chapter 1:Introduction
1.1 Who is this book for?
1.2 Why ontologies?
1.3 Why Python?
1.4 Why Owlready?
1.5 Book outline
1.6 Summary
Chapter 2:The Python language:Adopt a snake!
2.1 Installing Python
2.2 Starting Python
2.3 Syntax
2.3.1 Comments
2.3.2 Writing on screen
2.3.3 Help
2.3.4 Variables
2.3.5 Indentation
2.4 Main datatypes
2.4.1 Integer (int) and floating-point numbers (float)
2.4.2 Booleans (bool)
2.4.3 Character strings (str)
2.4.4 Lists (list)
2.4.5 Tuples (tuple)
2.4.6 Dictionaries (dict and defaultdict)
2.4.7 Sets (set)
2.4.8 Files (open)
2.4.9 Conversion between datatypes
2.5 Conditions (if)
2.6 Loops (for)
2.7 Generators
2.8 Functions (def)
2.9 Classes (class)
2.9.1 Classes and instances
2.9.2 Inheritance
2.9.3 Special method names
2.9.4 Functions and operators for object-oriented
programming
2.10 Python modules
2.10.1 Importing a module
2.10.2 Installing additional modules
2.11 Installing Owlready2
2.11.1 Installing Owlready2 from terminal
2.11.2 Installing Owlready2 from IDLE or Spyder (or any
Python shell)
2.11.3 Manual installation of Owlready2
2.12 Summary
Chapter 3:OWL ontologies
3.1 An ontology… what does it look like?
3.2 Creating ontologies manually with the Protégé editor
3.3 Example:An ontology of bacteria
3.4 Creating a new ontology
3.4.1 Classes
3.4.2 Disjoints
3.4.3 Partitions
3.4.4 Data properties
3.4.5 Object properties
3.4.6 Restrictions
3.4.7 Union, intersection, and complement
3.4.8 Definitions (equivalent-to relations)
3.4.9 Individuals
3.4.10 Other constructs
3.5 Automatic reasoning
3.6 Modeling exercises
3.7 Summary
Chapter 4:Accessing ontologies in Python
4.1 Importing Owlready
4.2 Loading an ontology
4.3 Imported ontologies
4.4 Listing the content of the ontology
4.5 Accessing entities
4.5.1 Individuals
4.5.2 Relations
4.5.3 Classes
4.5.4 Existential restrictions
4.5.5 Properties
4.6 Searching for entities
4.7 Huge ontologies and disk cache
4.8 Namespaces
4.9 Modifying entity rendering as text
4.10 Local directory of ontologies
4.11 Reloading an ontology in the quadstore
4.12 Example:creating a dynamic website from an ontology
4.13 Summary
Chapter 5:Creating and modifying ontologies in Python
5.1 Creating an empty ontology
5.2 Creating classes
5.2.1 Creating classes dynamically
5.3 Creating properties
5.4 Creating individuals
5.5 Modifying entities:relations and existential restrictions
5.6 Creating entities within a namespace
5.7 Renaming entities (refactoring)
5.8 Multiple definitions and forward declarations
5.9 Destroying entities
5.10 Destroying an ontology
5.11 Saving an ontology
5.12 Importing ontologies
5.13 Synchronization
5.14 Example:populating an ontology from a CSV file
5.14.1 Populating with individuals
5.14.2 Populating with classes
5.15 Summary
Chapter 6:Constructs, restrictions, and class properties
6.1 Creating constructs
6.2 Accessing construct parameters
6.3 Restrictions as class properties
6.4 Defined classes
6.5 Example:creating the ontology of bacteria in Python
6.6 Example:populating an ontology with defined classes
6.6.1 Populating using class properties
6.6.2 Populating using constructs
6.7 Summary
Chapter 7:Automatic reasoning
7.1 Disjoints
7.2 Reasoning with the Open-World assumption
7.3 Reasoning in a closed world or in a local closed world
7.4 Inconsistent classes and inconsistent ontologies
7.5 Restriction and reasoning on numbers and strings
7.6 SWRL rules
7.6.1 SWRL syntax
7.6.2 SWRL rules with Protégé
7.6.3 SWRL rules with Owlready
7.6.4 Advantages and limits of SWRL rules
7.7 Example:an ontology-based decision support system
7.8 Summary
Chapter 8:Annotations, multilingual texts, and full-text search
8.1 Annotating entities
8.2 Multilingual texts
8.3 Annotating constructs
8.4 Annotating properties and relations
8.5 Creating new annotation classes
8.6 Ontology metadata
8.7 Full-text search
8.8 Example:Using DBpedia in Python
8.8.1 Loading DBpedia
8.8.2 A search engine for DBpedia
8.9 Summary
Chapter 9:Using medical terminologies with PyMedTermino and
UMLS
9.1 UMLS
9.2 Importing terminologies from UMLS
9.3 Loading terminologies after initial importation
9.4 Using ICD10
9.5 Using SNOMED CT
9.6 Using UMLS unified concepts (CUI)
9.7 Mapping between terminologies
9.8 Manipulating sets of concepts
9.9 Importing all terminologies in UMLS
9.10 Example:Linking the ontology of bacteria with UMLS
9.11 Example:A multi-terminology browser
9.12 Summary
Chapter 10:Mixing Python and OWL
10.1 Adding Python methods to OWL classes
10.2 Associating a Python module to an ontology
10.2.1 Manual import
10.2.2 Automatic import
10.3 Polymorphism with type inference
10.4 Introspection
10.5 Reading restrictions backward
10.6 Example:Using Gene Ontology and managing “part-of”
relations
10.7 Example:A “dating site” for proteins
10.8 Summary
Chapter 11:Working with RDF triples and worlds
11.1 RDF triples
11.2 Manipulating RDF triples with RDFlib
11.2.1 Reading RDF triples
11.2.2 Creating new RDF triples with RDFlib
11.2.3 Removing RDF triples with RDFlib
11.3 Performing SPARQL requests
11.3.1 Searching with SPARQL
11.3.2 SPARQL prefixes
11.3.3 Creating RDF triples with SPARQL
11.3.4 Removing RDF triples with SPARQL
11.4 Accessing RDF triples with Owlready
11.5 Interrogating the SQLite3 database directly
11.6 Adding support for custom datatypes
11.7 Creating several isolated worlds
11.8 Summary
Appendix A:Description logics
Appendix B:Notations for formal ontologies
Appendix C:Reference manual
C.1 World class
C.2 Ontology class
C.3 Classes (ThingClass class)
C.4 Individuals (Thing class)
C.5 Properties (PropertyClass class and its descendants)
C.6 Constructs (Contruct class and its descendants)
C.6.1 Restriction class
C.6.2 Intersection (And class)
C.6.3 Union (Or class)
C.6.4 Complement (Not class)
C.6.5 Property inverse (Inverse class)
C.6.6 Individual set (OneOf class)
C.7 SWRL rules
C.7.1 Variable class
C.7.2 Rules (Imp class)
C.7.3 Class assertion atom (ClassAtom class)
C.7.4 Datatype assertion atom (DataRangeAtom class)
C.7.5 Object property value atom (IndividualPropertyAtom class)
C.7.6 Data property value atom (DatavaluedPropertyAtom class)
C.7.7 Same individual atom (SameIndividualAtom class)
C.7.8 Distinct individual atom (DifferentIndividualAtom class)
C.7.9 Built-in function atom (BuiltinAtom class)
C.8 PyMedTermino2
C.8.1 Terminology class
C.8.2 Concept in a terminology
C.8.3 Set of concepts (Concepts class)
C.9 Global functions
Index
About the Author
Lamy Jean-Baptiste
is a senior lecturer at Sorbonne Paris
Nord University and a member of the
LIMICS, a research lab focused on
biomedical informatics. He is also the
developer of the Owlready2 Python
module that allows access to OWL
ontologies. He has developed many
research prototypes, and one of them
(VCM iconic medical language) has been
patented in the United States, with three
licenses sold to industrial partners.
Jean-Baptiste speaks regularly at
artificial intelligence and medical
informatics conferences, has written over 50 journal papers, and is a
moderator on the Owlready forum on Nabbles. He was awarded the
best paper award at MEDINFO 2019, the largest international
conference in medical informatics.
Another Random Scribd Document
with Unrelated Content
Caput decimum octāvum.
« Quid hoc sibi vult ? ait sēcum Rōbinson, dum euntem ānxiīs
prōsequitur oculīs. Mēne homō dēserat, et ablātā secūrī aufugiat ?
an ille sit tam perfidus, ut meum habitāculum occupet, ut mē ipsum
vī inde arceat, et populāribus suīs inhūmānīs prōdat. Prōh scelus ! »
Statimque īnflammātus īrā hastam corripit, ut prōditōrem
persequātur, nefāriaque cōnsilia et pūniat et praevertat. Dum sīc dē
fide barbarī timet, videt hominem citātissimō cursū redeuntem.
Rōbinson sistit gradum, mīrāturque eum, quem prōditiōnem
māchinārī suspicātus fuerat, sublātum grāminis āridī manipulum
tenēre unde fūmus oriēbātur. Jam in flammam ērumpit ; et Vendredi,
manipulō in terram prōjectō, addit dīligenter majōrem grāminis āridī
atque sarmentōrum cōpiam, clārumque et ārdentem ignem
succendit : quod [147]quidem nōn minōrem Rōbinsōnī laetitiam quam
admīrātiōnem mōvit.
Duōrum ferē mēnsium spatiō fossa absolūta fuit. Quō factō, ita
mūnītī erant, ut jam barbarōrum impetum nōn modo nōn
extimēscere, sed eōs etiam, sī umquam oppugnārent arcem,
possent repellere. Prius enim quam ūllus fossam trānsīret aut pālōs
superāret, ab obsessīs aut sagittīs interficī, aut hastīs trānsfodī
impūne poterat. Itaque sēcūritātī suae nunc satis cōnsuluisse
vidēbantur.
[158]
I psā diē operī dēstinātā, aderat pluviārum tempus : quod bis per
annum ingruere Rōbinson nōn ūnīus annī experientiā didicerat.
Quō tempore per duōs mēnsēs perpetuōs nūllī negōtiō vacāre extrā
domum licēbat ; tantā vī continuus imber ruēbat dē caelō !
Animadverterat quoque Rōbinson esse valētūdinī omnīnō contrārium
illā tempestāte forās exīre. Quid igitur faciendum erat ? Dīlātā nāvis
cōnfectiōne, tempus in labōribus domesticīs cōnsūmendum fuit.
Rōb. Dīc mihi, quaesō, ō bone, nōstīne quis mare, quis terram,
quis animālia, tē ipsum dēnique creāverit ?
[166]
Vendr. Nēminī fās est eum adīre, nisi Ovocacēīs (id est
sacerdōtibus). Illī Ō dīcentēs eum interrogant, ac deinde nōbīs
referunt ejus respōnsa.
Vērum enim vērō cum jam mortālēs animīs dēficiunt, cum sunt
ab omnī spē dēstitūtī, tunc alma nūminis prōvidentia iīs praesentius