In this work, we study how one can make a particular kind of government data available as open data using semantic web technologies. We focus on Greek legislation and show how it can be modeled using ontologies expressed in the Web Ontology Language (OWL) and the Resource Description Framework (RDF), and queried using the expressive query language SPARQL. To demonstrate the applicability and usefulness of our approach we develop a web application, called Nomothesia, which makes Greek legislation easily accessible to the public. Nomothesia offers advanced services for retrieving and querying Greek legislation and is intended for the citizens through intuitive presentational views and search interfaces, but also for application developers for consuming its content through two web services: a SPARQL endpoint and a RESTful API.
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Modeling and Querying Greek Legislation using Semantic Web Technologies
1. MODELING AND QUERYING GREEK LEGISLATION
USING SEMANTIC WEB TECHNOLOGIES
Ilias Chalkidis, Charalampos Nikolaou, Panagiotis Soursos, and Manolis Koubarakis
NATIONAL AND KAPODISTRIAN
UNIVERSITY OF ATHENS
2. OUTLINE
MOTIVATION
RELATED WORK
BACKGROUND ON GREEK LEGISLATION
BACKGROUND ON SEMANTIC WEB TECHNOLOGIES
MODELING GREEK LEGISLATION
NOMOTHESIA WEB PLATFORM
FUTURE WORK
1
4. MOTIVATION
Retrieve the 10 legal documents with the most case laws
applied on them.
Find the 5 most crowded public organizations, in terms
of staff members per act publication.
Find the parliament members who voted in favor of the
declassification of forest land A and are elected in the
broader region.
Find the citizens who own the 10 largest pieces of land
classified as protected areas
Find the 3 former government officials with the most
recruitments according to their term in office.
Retrieve the legal document which certified the
undergraduate curriculum of Informatics &
Telecommunications department of the University of
Athens.
Nomothesia:
Greek
Legislation
Ontology
Hellenic PD
Kallikratis:
Greek
Administrative
Geography
Public
Buildings
Public
Organizations
Hellenic
Parliament
Diavgeia
Case
Laws
INSPIRE:
Protected
Areas
Greek
DBpedia
Hellenic
Cadastre
ELSTAT
EurLex
EUROSTAT
Greek
Census
Data
3
5. RELATED WORK
CEN METALEX
A popular format and vocabulary that is
used for the encoding of the structure and
content of legal and paralegal documents
is CEN MetaLex, which has now been
adopted and maintained by the European
Committee for Standardization (CEN).
MetaLex serves as:
an XML data exchange format,
but recently an ontology counterpart of
it has sprung up which is expressed in
the Web Ontology Language (OWL)
CEN MetaLex
4
9. BACKGROUND ON GREEK LEGISLATION
STRUCTURE OF GREEK LEGISLATION
• There are five primary sources of Greek legislation we are considering in this work:
• Constitution
• Presidential Decrees
• Laws
• Acts of Ministerial Cabinet
• Ministerial Decisions.
• These sources of legislation are materialized in legal documents, which are encoded following
specific standards.
•Legal documents are published in the government gazette.
8
10. BACKGROUND ON GREEK LEGISLATION
ENCODING OF GREEK LEGISLATION
The encoding of Greek legislation follows the rules set out in
“Manual Directives for encoding of legislation”:
• Articles are the basic divisions in the text of legal document
numbered using Arabic numerals (1, 2, 3, …)
• An article may have a list of paragraphs that are
numbered using Arabic numerals.
• Paragraphs may have a list of cases. Cases are numbered
using lower-case Greek letters (α, β, γ, ...) and may have
sub-cases which are numbered using double lower-case
Greek letters (αα, ββ, ...).
• The verbal period between two dots is termed as passage.
Passages are the elementary fragments of legal documents
and are written contiguously, i.e., without any line breaks
between them. Passages are the building blocks of cases
and paragraphs.
• Legal documents may be subdivided according to their size
at larger units, such as books, chapters, or sections, which are
numbered using upper-case Greek letters.
9
11. BACKGROUND ON GREEK LEGISLATION
ENCODING OF GREEK LEGISLATION - METADATA
In addition to the aforementioned structural elements,
legal documents are accompanied by metadata
information. This includes:
• The title of the legal document, which must be
general enough but concise so as to reflect its content
• The type (e.g., Law, Presidential Decree)
• The year of publication
• The number (i.e., the serial number counting from the
beginning of the year for each type).
The last three pieces of metadata information serve
also as a unique identifier of the legal document. Of
equal importance are also the issue and the sheet
number of the government gazette in which the legal
document is published.
10
12. BACKGROUND ON GREEK LEGISLATION
CITATIONS
When the reference to other legislation is
necessary, this should be done uniformly
throughout the text.
Specifically, for purposes of accuracy and
reading usability, citation must bear the
number of the legal document and the year
of publication.
At the first occurrence of the legal document,
the issue and the number of the sheet of the
Government Gazette must be stated in
brackets.
It should also be mentioned the fragment
thereof, where such reference
11
13. BACKGROUND ON GREEK LEGISLATION
LEGISLATIVE MODIFICATIONS
It is common international practice the amendment of a
legal document by subsequent legal documents.
Unfortunately, given the encoding of legal documents,
there is no standard methodology that is followed for the
codification of this legislative concept.
By systematic observation, we reached to the conclusion
that there are three main types of legislative
modifications:
• The substitution of a specific fragment by another
introduced by a subsequent legal document
• The addition of a new fragment
• The deletion of a specific fragment.
All these kinds of modifications produce new versions of
the original legal document.
12
16. BACKGROUND ON SEMANTIC WEB TECHNOLOGIES
RDF (Resource Description Framework)
OWL (Ontology Web Language)
SPARQL (Simple Protocol and RDF Query Language)
15
17. BACKGROUND ON SEMANTIC WEB TECHNOLOGIES
The Resource Description Framework (RDF) is a graph-based data model for representing information about resources
in the WWW. Resources are identified using URIs and described using triples.
nomothesia:pd/2011/54 PresidentialDecreerdf:type
Σύσταση Ειδικής Υπηρεσίας
Δημοσίων Έργων Αντιπλημμυρικής
προστασίας της Κοιλάδας του
ποταμού Έβρου και των
παραποτάμων του (ΕΥΔΕ ΕΒΡΟΥ)
dc:title
16
18. BACKGROUND ON SEMANTIC WEB TECHNOLOGIES
The Web Ontology Language (OWL) has been designed to represent rich and complex knowledge about resources,
groups of resources, and relations between them. Having an ontology, one may perform high-level reasoning tasks, such
as the verification of the consistency of the knowledge represented in it or the deduction of further knowledge implied
by the ontology
nomothesia:pd/2011/54 PresidentialDecreerdf:type
Σύσταση Ειδικής Υπηρεσίας
Δημοσίων Έργων Αντιπλημμυρικής
προστασίας της Κοιλάδας του
ποταμού Έβρου και των
παραποτάμων του (ΕΥΔΕ ΕΒΡΟΥ)
dc:title
BibliographicWork
owl:subClassof
owl:Class
rdf:type
rdf:type
17
19. BACKGROUND ON SEMANTIC WEB TECHNOLOGIES
SPARQL is the standard query language for querying RDF graphs. SPARQL has a very intuitive syntax based on the
notion of triple patterns and combinations of them using operators AND (denoted by the symbol ‘.’), UNION,
OPTIONAL, and FILTER for forming more complex patterns. SPARQL offers also other attractive constructs, such as
projection of variables, aggregate functions, groupings, etc.
SELECT ?legaldocument ?title ?type
WHERE{ ?legaldocument dc:title ?title.
?legaldocument rdf:type ?type.
?type owl:subClassOf BibliographicWork.
}
18
21. AN OWL ONTOLOGY FOR GREEK LEGISLATION
CitableBiblioGraphicObject
BibliographicWork BibliographicExpression BibliographicManifestation
LegislativeModification
Edit Addition Deletion
matterOf
embodies
BibliographicCitation
Fragment
patient
LegislativeCompetenceGround
LegislativeCompetenceGround
Book
Part
Section
Chapter
Article
Paragraph
Passage
partOf
partOf
partOf
partOf
partOf
partOf
Case
partOf
partOf
xsd:string
text
text
cites
xsd:string
context
Signer
signer
xsd:string
foaf:name
xsd:string
foaf:title
Gazette
xsd:integer
dc:title
xsd:date
dc:created
xsd:string
dc:title
xsd:String@el
tag
Place
gazette
place
xsd:string dc:title
xsd:string
legislationID
CEN Metalex Core
partOf
partOf
Law
ActOfMinisterialCabinet
PresidentialDecree
Constitution
MinisterialDecision partOf
realizes
20
22. MODELING GREEK LEGISLATION USING SEMANTIC
WEB TECHNOLOGIES
NOMOTHESIA URIs SCHEMA
http://legislation.di.uoa.gr/{type_of_legislation}/{year}/{id}
VERSIONAL EXTENSIONS
MANIFESTATION EXTENSIONS
Type URI extension
Current version -
Enacted version /enacted
Chronological version /{YYYY-MM-DD}
Type URI extension
XML /data.xml
PDF /data.pdf
RDF/XML /data.rdf
JSON /data.json
21
24. QUERYING GREEK LEGISLATION USING SEMANTIC
WEB TECHNOLOGIES
Retrieve the 10 most frequently modified legal documents between 2008-2013
SELECT ?legaldocumentURI ?title (COUNT(DISTINCT ?version) AS ?versions)
WHERE{ ?legaldocumentURI metalex:realizedBy ?version.
?legaldocumentURI dc:title ?title.
?modification metalex:legislativeCompetenceGround ?work.
?work dc:created ?date.
FILTER (?date >= "2008-01-01"^^xsd:date && ?date <= "2013-12-31"^^xsd:date)
} GROUP BY ?legaldocumentURI ?title
ORDER BY DESC(?versions)LIMIT 10
23
25. QUERYING GREEK LEGISLATION USING SEMANTIC
WEB TECHNOLOGIES
Retrieve the longest article in terms of number of passages and the title of the legal document
it belongs to that has been published in 2012
SELECT ?legaldocument ?title ?article (COUNT(?passage) as ?passages)
WHERE{ ?legaldocument metalex:part+ ?article.
?legaldocument dc:title ?title.
?legaldocument dc:created ?date.
?legaldocument nomothesia:legislationID ?id.
?legaldocument rdf:type ?type.
?article rdf:type nomothesia:Article.
?article metalex:part+ ?passage.
?passage rdf:type nomothesia:Passage.
FILTER ( ?date >= "2012-01-01"^^xsd:date && ?date <= "2012-12-01"^^xsd:date)
} GROUP BY ?article ?title ?legaldocument
ORDER BY DESC(?passages) LIMIT 1
24
26. QUERYING GREEK LEGISLATION USING SEMANTIC
WEB TECHNOLOGIES
Find the post government member that has signed the most legal documents during his service
(Presidents of Hellenic Republic excepted)
SELECT ?name (COUNT(?legaldocument) AS ?legaldocuments)
WHERE{ ?legaldocument nomothesia:signer ?signer.
?signer foaf:name ?name.
FILTER NOT EXISTS {?signer foaf:title "ΠΡΟΕΔΡΟΣ ΤΗΣ ΔΗΜΟΚΡΑΤΙΑΣ"@el}
} GROUP BY ?name
ORDER BY DESC(?legaldocuments) LIMIT 1
25
28. MODELING GREEK LEGISLATION USING
NOMOTHESIA: AN EXAMPLE
rdf:type
nomothesia:pd/2011/54
Presidential Decree
rdf:type
2011-05-20
dc:created
nomothesia:pd/2011/54/article/1
nomothesia:pd/2011/54/article/2
nomothesia:pd/2011/54/article/3
nomothesia:pd/2011/54/article/4
nomothesia:pd/2011/54/article/6
nomothesia:pd/2011/54/article/6
metalex:part
Σύσταση Ειδικής Υπηρεσίας
Δημοσίων Έργων Αντιπλημμυρικής
προστασίας της Κοιλάδας του
ποταμού Έβρου και των
παραποτάμων του (ΕΥΔΕ ΕΒΡΟΥ)
dc:title
nomothesia:pd/2011/54/article/1/paragraph/1
nomothesia:pd/2011/54/article/1/paragraph/2
nomothesia:pd/2011/54/article/1/paragraph/3
metalex:part
nomothesia:pd/2011/54/article/1/paragraph/1/passage/1
metalex:part
Συνιστάται Ειδική Υπηρεσία με τίτλο «Ειδική
Υπηρεσία Δημοσίων Έργων Αντιπλημμυρικής
προστασίας της κοιλάδας του ποταμού Έβρου και
των παραποτάμων του» (ΕΥΔΕ ΕΒΡΟΥ), με
αρμοδιότητα σε όλα τα θέματα που αφορούν στο
ειδικό και σημαντικό έργο της αντιπλημμυρικής
προστασίας της κοιλάδας του ποταμού Έβρου,
Ερυθροποτάμου, ʼρδα, παραποτάμων και
Περιφερειακής Τάφρου Ορεστιάδας
Paragraph
nomothesia:text
Passage rdf:type
leg:gazette/a/2010/135
A/2011/135
dc:title
nomothesia:pd/2011/54/signer/1nomothesia:signer
ΚΑΡΟΛΟΣ ΠΑΠΟΥΛΙΑΣ
foaf:name
ΠΡΟΕΔΡΟΣ ΤΗΣ ΔΗΜΟΚΡΑΤΙΑΣ
foaf:title
Signer
rdf:type
Gazette
rdf:type
nomothesia:gazette
27
30. MODELING GREEK LEGISLATION USING
NOMOTHESIA: AN EXAMPLE
Retrieve the structure of P.D. 2012/10, the
type of each part, and, optionally, its title
and text.
SELECT ?part ?text ?type ?title
WHERE { nomothesia:pd/2012/10 metalex:part+ ?part.
?part rdf:type ?type.
OPTIONAL { ?part nomothesia:text ?text. }
OPTIONAL { ?part dc:title ?title. }
}
29
31. MODELING GREEK LEGISLATION USING
NOMOTHESIA: AN EXAMPLE
Retrieve the name and the title of any person who has apply modifications on P.D. 2011/54
accompanied with the legal documents which are the Legislative Competence Grounds of these
modifications.
SELECT DISTINCT ?name ?title ?work
WHERE{ nomothesia:pd/2011/54 metalex:realizedBy ?version.
?version metalex:matterOf ?modification.
?modification metalex:legislativeCompetenceGround ?work.
?work nomothesia:signer ?signer.
?signer foaf:name ?name.
?signer foaf:title ?title.
}
30
39. FUTURE WORK
Apply Nomothesia on more data! Grant access to
the best available machine readable format for
legal documents and RDFize them.
Apply Nomothesia to the whole legislative process
coming through the Hellenic Parliament from the
beginning (draft legal document comes in from the
ministry) till the very end (legal document finally
come out of enforcement). Demonstrate as a
public service!
Link Greek legislation with other government
data that are made available as linked data
38