<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<info>
    
    
    
    
    
    
    
    
    
<title>An address book ontology (take 2)</title><biblioid class="uri">http://norman.walsh.name/2005/11/30/contacts</biblioid>
<volumenum>8</volumenum>
<issuenum>154</issuenum>
<pubdate>2005-11-30T10:13:27-05:00</pubdate>
<date>$Date: 2007-02-20 17:01:06 -0500 (Tue, 20 Feb 2007) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2005</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>More thoughts on modelling names and addresses.</para>
</abstract>
<dcterms:replaces>http://norman.walsh.name/2005/11/25/contacts</dcterms:replaces>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Lazyweb"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#RDF"/>
</info>

<para xml:id="p1">In proper Lazyweb
fashion, posting about a topic invariably leads to new information
about the topic. In this particular case:</para>

<itemizedlist>
<listitem>
<para xml:id="p2"><personname>
	  <firstname>David</firstname>
	  <surname>Powell</surname>
</personname> pointed me to the
<link xlink:href="http://rdfweb.org/topic/AddressVocab">AddressVocab</link>,
a vocabulary for postal addresses derived directly from a draft
<abbrev xlink:href="http://www.upu.int/">UPU<alt>Universal Postal Union</alt></abbrev>
specification.</para>
<para xml:id="p3">It's a bit tricker to generate this model from the raw address book
data, but not impossible. Does the benefit of using a more standard vocabulary
outweigh the cost (in terms of complexity) of using it? Time will tell.
</para>
</listitem>
<listitem>
<para xml:id="p7">The <link xlink:href="http://vocab.org/bio/0.1/">BIO</link> vocabulary
looks like a more standard way to deal with birthdays. And it will naturally
handle anniversaries and deaths, too.</para>
</listitem>
<listitem>
<para xml:id="p4">And with another few days of experience under my belt, I think
Rich's
<link xlink:href="http://norman.walsh.name/2005/11/25/contacts#comment0003">suggestion</link>
to avoid all the subproperty names is worth pursuing. Instead of making classes
for all the different kinds of phone numbers and email addresses, I'm simply 
assigning labels to them. They are, after all, just labels in my address book
(I don't actually <emphasis>know</emphasis> if your “Work” phone number is or
isn't a mobile phone, for example.)</para>
</listitem>
</itemizedlist>

<para xml:id="p5">That reduces the size of my ontology considerably:</para>

<programlisting># -*- N3 -*-

@prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; .
@prefix xs: &lt;http://www.w3.org/2001/XMLSchema#&gt; .
@prefix c: &lt;http://nwalsh.com/rdf/contacts#&gt; .
@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .

# What about bio: http://vocab.org/bio/0.1/
# Or contacts: http://www.w3.org/2000/10/swap/pim/contact

&lt;http://nwalsh.com/rdf/contacts&gt; a owl:Ontology;
    rdfs:comment "Norm's ontology for his address book." .

# ------------------------------------------------------------

# A contact in an address book
c:Contact a owl:Class;
    rdfs:subClassOf
        [
             a owl:Restriction;
             owl:cardinality "1"^^xs:nonNegativeInteger;
             owl:onProperty c:lastModified ] .

# Timestamp of address book entry
c:lastModified a owl:DatatypeProperty;
    rdfs:domain c:Contact;
    rdfs:range xs:dateTime .

# Category in address book
c:category a owl:DatatypeProperty;
    rdfs:domain c:Contact .

# A middle name (other name properties come from FOAF)
c:middleName a owl:DatatypeProperty .

# Company and title
c:associatedName a owl:DatatypeProperty .
c:associatedTitle a owl:DatatypeProperty .

# Labels
c:label a owl:DatatypeProperty .

# Notes
c:notes a owl:DatatypeProperty .</programlisting>

<para xml:id="p6">Time, as I said, will tell if these are good choices.</para>

</essay>

