Tutorial

Introduction

This tutorial describes several ways how data of historical accounting records can be prepared to be published in DEPCHA.

To avoid any confusion about the spelling (especially the use of lower and upper case) please keep the following in mind:

  • All the classes from the Bookkeeping Ontology start with capital letters: bk:EconomicUnit or bk:Commodity.
  • The first letter of an object property or data property is always written in lower case: bk:hasPrice or bk:entry.
  • Whenever we are using the attribute @ana for the annotation in our XML files the values we add start with lower case: bk:commodity or bk:unit
  • If something in this tutorial begins with the prefix bk:, it means that it is a concept defined in the Bookkeeping Ontology. The prefix bk: stands for the URI http://gams.uni-graz.at/o:depcha.bookkeeping#. (See more about TEI-prefix definitions with <tei:prefixDef> in the chapter Definition of Prefixes).

Please Note: All the snippets and exemplary extracts of datasets of the DEPCHA collection might differ from the original dataset due to eventual adaptions that should help you to understand the options of mapping different contents to the Bookkeeping Ontology.

XML/TEI

Before we can start mapping our Bookkeeping Ontology onto our historical accounting book, we need to produce a digital version of our document in terms of a digital transcription. So, let's imagine we have an original that looks like this:

The Stagville Accounts - Original
Figure 1: The Stagville Accounts - Original

And here you can see how the given example could be transformed:

Stagville August 1st 1808
69 James Haley Self Dr.

1/4 lb Powder 2/6 1 lb Shot 2/6 1 lb Sugar 2/6 7 6
1 Shoe Knife 1/6 1 6
9 -

Let's take a closer look at our source that describes an economic transaction. Typical entities to be found in a booking account are mostly two economic units (here: the Stagville farm and James Haley), some economic goods (powder, shot, sugar and a shoe knife) and units of measurements (1/4 lb or 1 lb). Usually, we can also identify a date (August 1st 1808), prices for the single goods (1/6 or 2/6) and the sum of the prices as a value (9).

One possible way of annotating a digital edition - and that's the practice suggested in this tutorial - is to create an XML/TEI. The structure in the source above describes two bk:Transaction entities with their textual representation in two rows. Having a look at the first row that represents a bk:entry we can summarize the interpretation of it as the following:
The person James Haley buys 1/4 lb Powder for the price of 2/6 and he further buys 1 lb Shot for the price of 2/6 and at last he buys 1 lb Sugar for the price of 2/6 from Stagville (representing a farm/plantation). James Haley therefore transfers the monetary value of 7 shillings and 6 pence to Stagville (Note: 1 shilling = 12 pence). Not all information is explicit inside the bk:entry but it can also be found in the header (like the involved parties or the date in this example) or is known by the domain expert of the source. In this particular case a table seems to be the best way to describe the text structure as shown in the following XML/TEI snippet:

<text>
  <body>  
    <head>Stagville August 1st 1808</head> 
    <table>  
      <head>69 James Haley J Self Dr.</head> 
      <row>   
        <cell>1/4 lb Powder 2/6 1 lb Shot 2/6 1 lb Sugar 2/6</cell>  
        <cell/>   
        <cell>7</cell>   
        <cell>6</cell> 
      </row>  
      <row>   
        <cell>Shoe Knife 1/6</cell>    
        <cell/>  
        <cell>1</cell>   
        <cell>6</cell>  
      </row>   
      <row>    
        <cell/>   
        <cell/>    
        <cell>9</cell> 
        <cell>-</cell>   
      </row> 
    </table>
  </body>
</text>

						
Code Snippet 1: Two entries from the Stagville Accounts encoded as table in XML/TEI.

XML/TEI offers us full expressiveness to describe a text. Next to some attributes for formalizing data, we can enrich the text with annotations using the TEI attribute ana for the connection with the Bookkeeping Ontology. Let's look at that in more detail now.

The starting point is to define a container for a bk:Transaction by annotating the textual representation of a bk:entry in a <div>, <row> or <seg> (or any other element that fits to your data and the TEI guidelines). By using @ana with the value "bk:entry" a TEI structure is defined as a bk:entry according to the Bookkeeping Ontology.

<row ana="bk:entry">
  <cell>1/4 lb Powder 2/6 1 lb Shot 2/6 1 lb Sugar 2/6</cell>
  </cell>
  <cell>7</cell>
  <cell>6</cell>
</row>
<row ana="bk:entry">
  <cell>Shoe Knife 1/6</cell>
  <cell/>
  <cell>1</cell>
  <cell>6</cell>
</row>

						
Code Snippet 2: Annotation of a textual structure - in this case a row in a table - as a text entry of a transaction.
The Basics

Now we can define further concepts which describe a bk:Transaction inside the <row> element (bk:entry). A bk:Transaction consists of at least one bk:Transfer that defines the flow of a bk:EconomicAsset. This can be further specified as bk:EconomicGood which can be a bk:Commodity, bk:Service, bk:Right, or a bk:Money. We can not only express the flow of a bk:EconomicAsset from one bk:EconomicUnit to another, but also the direction of the flow by using bk:from and bk:to.

We first deal with the question: "What is transferred?"

In the first row of this example three different bk:Commodity are mentioned:

  • 1/4 lb Powder
  • 1 lb Shot
  • 1 lb Sugar

As well as two bk:Money:

  • 7 shilling
  • 6 pence

In the second row we have the bk:Commodity Shoe knife and two bk:Money: 7 shilling and 6 pence. As we can see in the snippet above right after every single bk:Commodity there are further bk:Money belonging to each bk:Commodity that can be interpreted as bk:Price - like in the first row ¼ lb Powder for 2 shilling and 6 pence. But let's ignore the bk:Price in this first step. We will get to them in the chapter Prices.

The <measure> element in TEI allows to annotate countable entities using the attributes @unit, @unitRef, @commodity and @quantity. More information about these attributes can be found here. Just remember that the @quantity only works with numbers.

So, to have all this information mapped to an RDF (like in this preview) that uses the terms and labels of our ontology we can simply use this TEI element and do not have add a bk: to the attributes. Those attributes will help us to normalize our data within the cells like in the following snippet.

<row ana="bk:entry">
  <cell>  
    <measure commodity="powder" quantity="0.25" unit="lb">1/4 lb Powder</measure> 
    <measure commodity="shot" quantity="1" unit="lb">1 lb Shot</measure>  
    <measure commodity="sugar" quantity="1" unit="lb">1 lb Sugar</measure>
  </cell>
  <cell/>
  <cell> 
    <measure quantity="7" unit="shilling">7</measure>
  </cell>
  <cell> 
    <measure quantity="6" unit="pence">6</measure>
  </cell>
</row>
<row ana="bk:entry">
  <cell>  
    <measure commodity="shoeknife" quantity="1">1 Shoe Knife 1/6</measure>
  </cell>
  <cell/>
  <cell>   
    <measure quantity="1" unit="shilling">1</measure>
  </cell>
  <cell>  
    <measure quantity="6" unit="pence">6</measure>
 </cell>
</row>
							
Code Snippet 3: Adding the attributes @commodity, @quantity and @unit to the <measure> element to normalize the data.

If we are not adding a @unit to our <measure> element, it will be considered being a "piece" by default.

Let's also look at another example showing the application of the attribute @unitRef that references to the <unitDecl> section in the <teiHeader>. You should always prioritize the use of @unitRef over @unit for a better structure of your TEI. The snippet below shows us how currency units could be referenced:

<teiHeader>
   <fileDesc/>
   <encodingDesc>
     <unitDecl>
       <unitDef type="currency" xml:id="fl">
         <label>Gulden Reichswährung</label>
       </unitDef>
       <unitDef type="currency" xml:id="kr">
         <label>Kreuzer</label>
         <label type="abbr">kr</label>
       </unitDef>
       <unitDef type="currency" xml:id="d">
         <label>Denari</label>
         <label type="abbr">d</label>
       </unitDef>
     </unitDecl>
   </encodingDesc>
 </teiHeader>
 <text>
   <body>
     <div type="example">
       <head> Von dem Haupt Zollner Liechtenstein Thomas Walser</head>
       <p ana="bk:entry">von 22. Novembris bis 22 Decembris 
         <measure ana="bk:money" quantity="60" unitRef="#fl">60</measure>
         <measure ana="bk:money" quantity="15" unitRef="#kr">15</measure>
         <measure ana="bk:money" quantity="0.25" unitRef="#d">1/4</measure>
       </p>
       <fw ana="bk:subtotal"> Latus <measure ana="bk:money" quantity="1689" unitRef="#fl"
           >1689</measure>
       </fw>
    </div>
  </body>
</text>
							
Code Snippet 4: Using @unitRef to normalize the data.

In the next step we reference the <measure> element to the Bookkeeping Ontology by using @ana. We want to say that powder, sugar and shot as well as the shoe knife are members of the class bk:Commodity and the 7 shillings and 6 pence as well as the 1 shilling and 6 pence belong to the class bk:Money of our ontology. Therefore, we add ana="bk:commodity" and ana="bk:money" to the corresponding elements.

<row ana="bk:entry">
  <cell>  
    <measure ana="bk:commodity" commodity="powder" quantity="0.25" unit="lb">1/4 lb Powder</measure>  <measure ana="bk:commodity" commodity="shot" quantity="1" unit="lb">1 lb Shot</measure>  <measure ana="bk:commodity" commodity="sugar" quantity="1" unit="lb">1 lb Sugar</measure>
  </cell>
  <cell/>
  <cell>  
    <measure ana="bk:money" quantity="7" unit="shilling">7</measure>
  </cell>
  <cell> 
    <measure ana="bk:money" quantity="6" unit="pence">6</measure>
  </cell>
</row>
<row ana="bk:entry">
  <cell>  
    <measure ana="bk:commodity" commodity="shoeknife" quantity="1">1 Shoe Knife 1/6</measure>
  </cell>
  <cell/>
  <cell>  
    <measure ana="bk:money" quantity="1" unit="shilling">1</measure>
  </cell>
  <cell>
    <measure ana="bk:money" quantity="6" unit="pence">6</measure>
  </cell>
</row>
							
Code Snippet 5: ana="bk:money" marks a <measure> as a bk:Money and ana="bk:commodity" as a bk:Commodity.

The first bk:Transaction (first row) consists of 2 bk:Transfer now - one transferring powder, sugar and shot, the other transferring 7 shillings and 6 pence.

Let's define the directions of the flow of assets for the first bk:Transaction which can be summarized like shown below:

  • powder, sugar, shot from Stagville to James Haley
  • 7 shilling, 6 pence from James Haley to Stagville
To express the flow direction in our example we can use ana="bk:from" and ana="bk:to". It is possible to add this kind of annotation to any TEI structure we are using for the annotation of members of the class bk:EconomicUnit in our document. This will usually be elements like <name> , <persName> or <orgName> (you will find more about the different types in the chapter Economic Units). As for the RDF representation URIs are needed, we have to assign a unique ID for every bk:EconomicUnit (even though it may be an unknown group of economic units) using @ref.

The following code snippet now shows how we express that the bk:Money of 7 shillings and 6 pence flows from James Haley (normalized by an @xml:id reference as economic_unit.2) to Stagville (with the reference economic_unit.1). Notice that by default the flow of money is always encoded explicitly in DEPCHA.

<head><name ana="bk:to" ref="#economic_unit.1">Stagville</name> August 1st 1808</head>
<table>
  <head>69 <name ana="bk:from" ref="#economic_unit.2">James Haley</name> J Self Dr.</head>
  <row ana="bk:entry"> 
    <cell>
      <measure ana="bk:commodity" commodity="powder" quantity="0.25" unit="lb">1/4 lb Powder</measure>    
      <measure ana="bk:commodity" commodity="shot" quantity="1" unit="lb">1 lb Shot</measure>    
      <measure ana="bk:commodity" commodity="sugar" quantity="1" unit="lb">1 lb Sugar</measure> 
    </cell>  
    <cell/>  
    <cell>    
      <measure ana="bk:money" quantity="7" unit="shilling">7</measure>  
    </cell>
    <cell>   
      <measure ana="bk:money" quantity="6" unit="pence">6</measure> 
    </cell>
  </row>
</table>
							
Code Snippet 6: Extension of <name> to express the directions "bk:from" and "bk:to" of the assets and also normalizing people or organizations with a reference.

First RDF preview: After performing these basic steps the following RDF could be extracted automatically, when the XML/TEI is ingested into DEPCHA.

<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1">
  <bk:entry>1/4 lb Powder 1 lb Shot 1 lb Sugar 7 6</bk:entry>
  <bk:consistsOf>  
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1"> 
      <bk:transfers>     
        <bk:Commodity rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1EA1">   
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#lb"/>     
          <bk:quantity>0.25</bk:quantity>  
          <bk:commodity rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#powder"/> 
        </bk:Commodity>   
      </bk:transfers>  
      <bk:transfers>   
        <bk:Commodity rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1EA2">     
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#lb"/>       
     <bk:quantity>1</bk:quantity>   
          <bk:commodity rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#shot">     
        </bk:Commodity>   
      </bk:transfers>   
      <bk:transfers>   
        <bk:Commodity rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1EA3">      
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#lb"/>   
          <bk:quantity>1</bk:quantity>   
          <bk:commodity rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#sugar"/>   
        </bk:Commodity>  
      </bk:transfers>  
      <bk:from rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#economic_unit.1"/> 
      <bk:to rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#economic_unit.2"/> 
    </bk:Transfer>
  </bk:consistsOf>
  <bk:consistsOf> 
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T2"> 
      <bk:transfers>    
        <bk:Money rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T2EA1">    
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#shilling"/>  
          <bk:quantity>7</bk:quantity>  
        </bk:Money> 
      </bk:transfers>
      <bk:transfers>    
        <bk:Money rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T9T2EA2">  
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#pence"/>  
          <bk:quantity>6</bk:quantity>   
        </bk:Money>    
      </bk:transfers>   
      <bk:from rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#economic_unit.2"/>  
      <bk:to rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#economic_unit.1"/>
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
							
Code Snippet 7: XML/RDF of a transaction: James Haley buys 1/4 lb Powder, 1 lb Shot and 1 lb Sugar.
Economic Goods

Before we look into specific classes and their annotation let's go back to the different bk:EconomicAsset entities that we have already seen and that can either be bk:Money or different categories of the class bk:EconomicGood. As mentioned in the chapter about the basics the latter can be divided into three classes:

1. Commodity

We have already become acquainted with bk:Commodity in the example before: commodities are fungible items - mostly physical objects - that were produced to satisfy wants or needs. The bk:Commodity in the following example is a loaf of bread.

<row ana="bk:entry">
  <cell>522</cell>
  <cell>
    <name ana="bk:to" ref="#pers_WCDH156" type="person">Stephen Bailey</name>
    <lb/> " <measure ana="bk:commodity" unit="loaf" quantity="1" commodity="#c_bread"> 1
      loaf Bread </measure>9d </cell>
  <cell/>
  <cell/>
  <cell/>
  <cell/>
</row>
							
Code Snippet 8: Annotation of one particular category of bk:EconomicGood: the bk:Commodity

2. Service

Any activity or transaction of non-tangible goods can be annotated with ana="bk:service". The snippet below shows the trade of an insurance assigned to the class bk:Service of the Bookkeeping Ontology.

<row ana="bk:entry">
  <cell>
    <date ana="bk:when" when="1937-02-02"/>
  </cell>
  <cell>
    <name ana="bk:to" ref="#LeslieGodwinLd">Leslie &amp; Godwin Ld</name>
    <measure ana="bk:service" commodity="Insurance">Insurance under Collision
      Clause</measure>
  </cell>
  <cell>
    <measure ana="bk:money" quantity="12" unit="shilling">12</measure>
  </cell>
  <cell>
    <measure ana="bk:money" quantity="10" unit="pence">10</measure>
  </cell>
</row>
Code Snippet 9: A bk:Service is another possible bk:EconomicGood that can be part of a bk:Transaction.

3. Rights

There is also another category of intangible goods that we can annotate using bk:right. In the example below John Coleman acquired the right for his cows to graze on the range of another farmer.

<row ana="bk:entry">
      <cell>
          <date ana="bk:when" when="1897-04-26">&quot;</date>
      </cell>
      <cell>
          <measure ana="bk:right" commodity="grazingrights">right of pasture - 1/2 year</measure>
          <span ana="bk:status">in full</span> - <name ana="bk:from" ref="org.3">John Coleman</name>
      </cell>
      <cell>
          <measure ana="bk:money" commodity="currency" quantity="10" unit="dollars">10</measure>
      </cell>
      <cell>
          <measure ana="bk:money" commodity="currency" quantity="50" unit="cents">&quot;-&quot;</measure>
      </cell>
  </row>
Code Snippet 10: The Bookkeeping Ontology enables us to also annotate entities of bk:Right.
Dates

The date of a transaction would be a data property in our ontology (bk:when) and can be annotated by adding ana="bk:when" to a <date> element. The @when attribute helps us to normalize the date. You can also use @from and @to to set a time range. However, not every date inside a bk:entry is the date of the transaction and the date might not always be mentioned inside the transaction. It is also possible that some single transactions or all of the transactions share one specific date. And let's not forget that the date might not be mentioned in the document, but you know it from a reliable source.

For those different cases different priorities may arise:

  • The highest priority is given to dates inside a bk:entry. So, if there is a date inside a transaction, you should annotate this date like in the following example.
    <p ana="bk:entry">
      Item am <date ana="bk:when" when="1402-01-01">s<supplied reason="missing">[o]</supplied>nntag nach Eibnitÿ</date>
      prachten dÿ<lb/><name ref="#pers_SR051" ana="bk:from">obgeschriben visser</name>
      <measure ana="bk:commodity" commodity="fish" quantity="18" unit="pound">18 lb visch</measure> 
      dem <name ref="#pers_SR052">herrn Kaspar</name>.
    </p>
    									
    Code Snippet 11: The <date> element is enriched by a @when to normalize the date inside the bk:entry.
  • Second-level priority should be given to dates that can be found in a superior structure. This means the corresponding date appears outside the bk:entry like in the code snippet below. Both bk:entry share the same date, as the tabular structure clearly indicates. James Haley bought 1/4 lb Powder for 7 shillings on the 1st August 1808 and Elisabeth Example bought 1 lb Shot on the same day.
    <table>
      <head>
        <name ana="bk:to" ref="#economic_unit.1">Stagville</name> 
        <date ana="bk:when" when="1808-08-01">August 1st 1808</date>
      </head>
      <row ana="bk:entry"> 
        <cell>  
          <measure ana="bk:commodity" commodity="powder" quantity="0.25" unit="lb"><name ana="bk:from" ref="#economic_unit.2">James Haley</name>: 1/4 lb Powder</measure>  
        </cell> 
        <cell>
          <measure ana="bk:money" quantity="7" unit="shilling">7</measure> 
        </cell>
      </row>
      <row ana="bk:entry"> 
        <cell>
          <measure ana="bk:commodity" commodity="shot" quantity="1" unit="lb"><name ana="bk:from" ref="#economic_unit.3">Elisabeth Example</name>:1 lb Shot</measure> 
        </cell>
        <cell>
          <measure ana="bk:money" quantity="5" unit="shilling">5</measure>  
        </cell>
      </row>
    </table>
    Code Snippet 12: The date in <head> element will be applied for every single bk:entry in the <table>.
  • If all transactions of one XML/TEI share the same date, you can define a bk:when in the <teiHeader> .
    <teiHeader>
      <sourceDesc>  
        <msDesc>   
          <msIdentifier>   
            <repository>Virgina Library</repository>  
          </msIdentifier>   
          <physDesc>   
            <objectDesc>
              <p>One page of a parchment paper of a memorandum from 1851. This page represents <date ana="bk:when" when="1851-11-02">November 2nd 1851</date>.</p> 
            </objectDesc>    
          </physDesc>  
        </msDesc>
      </sourceDesc>
    </teiHeader>
    <text>
      <body>  
        <p>Memorandum of a Day of work done by Michael Nilson &amp; his son Fred and by his cousin Richard Smith &amp; his son Robert.</p>  
        <table>   
          <row ana="bk:entry">    
            <cell><name ana="bk:from" ref="#between.1">self &amp; Fred</name> <measure ana="bk:service" commodity="work">1 day</measure>
            </cell>  
            <cell><measure ana="bk:money" unit="dollar" quantity="1.50">$1.50</measure></cell>    
          </row>  
          <row ana="bk:entry">     
            <cell><name ana="bk:from" ref="#between.1">Richard &amp; Robert</name> <measure ana="bk:service" commodity="work">½ day</measure></cell>   
            <cell><measure ana="bk:money" unit="dollar" quantity="0.75">$0.75</measure></cell>  
          </row> 
        </table>
      </body>
    </text>
    Code Snippet 13: The date in the <teiHeader> will be used for every bk:entry in the TEI document.
Economic Units

Economic units can be individuals, groups of people, organizations, a state, a city or a king. By default, every bk:from and bk:to creates a bk:EconomicUnit. You can also determine the category of a bk:EconomicUnit by adding bk:group, or bk:individual to the attribute @ana. The following example shows the annotation of a group of fishermen delivering fish. In this case the <name> element is extended by ana="bk:from bk:group" for the fishermen and ana="bk:to bk:individual" for the person receiving the fish.

<p ana="bk:entry">
  Item am <date ana="bk:when" when="1402-01-01">s<supplied reason="missing">[o]</supplied>nntag nach Eibnitÿ</date>
  prachten dÿ<lb/><name ref="#pers_SR051" ana="bk:from bk:group">obgeschriben visser</name>
  <measure ana="bk:commodity" commodity="fish" quantity="18" unit="pound">18 lb visch</measure> 
  dem <name ref="#pers_SR052" ana="bk:to bk:individual">herrn Kaspar</name>.
</p>
							
Code Snippet 14: Identifying a bk:EconomicUnit by adding bk:group.
Index - Economic Units

It is highly recommended to organize all bk:EconomicUnit in a <listPerson> or a <listOrg> element. This list section can be located at different spots of the TEI and does necessarily have to be labeled with ana="bk:index". This should allow other people or organization lists to be used independently of DEPCHA. In the following example Eliza Wheaton pays $20.00 to Laban Morey Wheaton. Laban Morey Wheaton is identified by an @xml:id, because we know that it was his accounting book. Further prosopographic information can then be put into <listPerson>. Every bk:to and bk:from will use the @xml:id from @ref to reference to a <person> in <listPerson>.

Not every piece of information in the person index is mapped to RDF, but it is shown in the edition view (the view generated from the XML/TEI).

<teiHeader>
  <fileDesc>  
    <!-- ... -->
  </fileDesc>     
  <profileDesc>   
    <particDesc>  
      <listPerson ana="bk:index">     
        <person xml:id="pers_WCDH001">   
          <persName>          
            <forename type="first">Eliza</forename>     
            <surname type="married">Wheaton</surname>     
          </persName>     
          <birth when="1809-09-27"/>     
          <sex value="2"/>      
          <death when="1905"/>      
        </person>     
        <person xml:id="pers_WCDH002">
          <persName>        
         <forename type="first">Laban</forename>   
            <forename type="middle">Morey</forename>  
            <surname>Wheaton</surname>        
          </persName>       
          <birth when="1796-09-14"/>      
          <sex value="1"/>   
          <occupation>       
            <roleName>Postmaster</roleName>   
          </occupation>    
          <affiliation>    
            <roleName>Representative <orgName ref="#org_WCDH5">Massachusetts General   
              Court</orgName>          
            </roleName>        
          </affiliation>    
          <occupation>   
            <roleName>Member <orgName ref="#org_WCDH6">Massachusetts Governor's Council</orgName></roleName>       
          </occupation> 
          <affiliation>    
            <roleName>Trustee</roleName>    
            <orgName ref="#org_WCDH7">State Industrial School for Girls</orgName>    
          </affiliation>    
          <death when="1865"/>    
        </person>    
      </listPerson> 
    </particDesc>
  </profileDesc>
</teiHeader>
<text>
  <body>  
    <table>  
      <row ana="bk:entry">   
        <cell ana="bk:status" corresp="#522">522</cell>    
        <cell>      
          <name ana="bk:from" full="yes" ref="#pers_WCDH001" type="person">Eliza Wheaton</name>    
          <span ana="bk:debit"> 
            <choice>          
              <abbr ana="bk:debit">D</abbr>       
              <expan>debtor</expan>         
            </choice>    
          </span>
          <lb/> To <name ana="bk:to" full="yes" ref="#pers_WCDH002" type="account">cash $20.00 </name>     
        </cell>     
        <cell>     
          <measure ana="bk:money" quantity="20" unit="dollar">20</measure>    
        </cell>  
        <cell> 00 </cell>  
        <cell/>    
        <cell/>   
      </row> 
    </table>
  </body>
</text>
							
Code Snippet 15: Referencing persons as bk:EconomicUnit to a <listPerson> sections.

Another preview showing how additional data are transferred by default from the TEI structure to LOD statements in RDF.

<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1">
  <bk:entry>522 Eliza Wheaton D debtor To cash $20.00 20 00</bk:entry>
  <bk:consistsOf>  
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1">    
      <bk:transfers>      
        <bk:Money rdf:about="https://gams.uni-graz.at/o:depcha.example.1#T1T1EA">        
          <bk:unit rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#dollar"/>        
          <bk:quantity>20</bk:quantity>      
        </bk:Money>    
      </bk:transfers>    
      <bk:from rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#pers_WCDH001"/>    
      <bk:to rdf:resource="https://gams.uni-graz.at/o:depcha.example.1#pers_WCDH002"/> 
    </bk:Transfer>
 </bk:consistsOf>
</bk:Transaction>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/o:depcha.example.1#pers_WCDH001">
  <foaf:givenName>Eliza</foaf:givenName>
  <foaf:familyName>Wheaton</foaf:familyName>
  <rdfs:label>Eliza Wheaton</rdfs:label>
  <schema:birthDate>1809-09-27</schema:birthDate>
  <schema:gender rdf:resource="https://schema.org/Female"/>
  <schema:deathDate>1905</schema:deathDate>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/o:depcha.example.1#pers_WCDH002">
  <foaf:givenName>Laban</foaf:givenName>
  <foaf:givenName>Morey</foaf:givenName>
  <foaf:familyName>Wheaton</foaf:familyName>
  <rdfs:label>Laban Morey Wheaton Husband Husb.</rdfs:label>
  <schema:birthDate>1796-09-14</schema:birthDate>
  <schema:gender rdf:resource="https://schema.org/Male"/>
  <schema:hasOccupation>Postmaster</schema:hasOccupation>
  <schema:affiliation>Representative Massachusetts General Court</schema:affiliation>
  <schema:hasOccupation>Member Massachusetts Governor's Council</schema:hasOccupation>
  <schema:affiliation>Trustee State Industrial School for Girls</schema:affiliation>
  <schema:deathDate>1865</schema:deathDate>
</bk:EconomicUnit>
							
Code Snippet 16: Some, but not all TEI statements will be transferred into an LOD structure.

As you can see inside the <bk:Transaction> element of the RDF the xml:id references are used as identifiers for the <bk:EconomicUnit> elements. If you do not use the references to an xml:id when adding the bk:to and bk:from to the bk:EconomicUnit in the TEI, the RDF transformation will only provide you "anonymous" identifiers. Moreover, don't forget: to get all the information from the <listPerson> in the section of the RDF that gives you details to all the bk:EconomicUnit entities you need to add a bk:index in your TEI.

Index - Economic Goods

As described in the chapter Basics in DEPCHA a bk:EconomicGood is expressed by adding ana="bk:commodity", ana="bk:service" or ana="bk:right" to the <measure> element. It is helpful to create a bk:index as we did for bk:EconomicUnit. According to the TEI guidelines a <taxonomy> in the <teiHeader> defines a typology either implicitly or explicitly by a structured taxonomy. So, this can be used to specify historical commodities for a document. If @ana="bk:index" is added to a <taxonomy>, the hierarchy and categories are transformed into SKOS. In the following example a hierarchy is created by the nested structure of <category> elements. The use of an @xml:id and <catDesc> elements is obligatory. Optionally, you can reference to a controlled vocabulary or to Wikidata concepts using @ref in <term> .

<taxonomy ana="bk:index">
<gloss>Commodities</gloss>
<category xml:id="grain">
  <catDesc><term ref="wd:Q2995529" xml:lang="de">Getreide</term></catDesc>
  <category xml:id="rye">
     <catDesc><term ref="wd:Q12099" xml:lang="de">Roggen</term></catDesc>
  </category>
  <category xml:id="wheat">
     <catDesc><term ref="wd:Q15645384" xml:lang="de">Weizen</term></catDesc>
  </category>
  <category xml:id="barley">
     <catDesc><term ref="wd:Q11577" xml:lang="de">Gerste</term></catDesc>
  </category>
  <category xml:id="flour">
     <catDesc><term ref="wd:Q36465" xml:lang="de">Mehl</term></catDesc>
     <category xml:id="wheatflour">
        <catDesc><term ref="wd:Q2249305" xml:lang="de">Weizenmehl</term></catDesc>
     </category>
     <category xml:id="ryeflour">
        <catDesc><term ref="wd:Q10658708" xml:lang="de">Roggenmehl</term></catDesc>
     </category>
  </category>
</category>
<category xml:id="animal">
  <catDesc><term ref="wd:Q729" xml:lang="de">Tier</term></catDesc>
  <category xml:id="goose">
     <catDesc><term ref="wd:Q3736439" xml:lang="de">Gans</term></catDesc>
  </category>
  <category xml:id="sheep">
     <catDesc><term ref="wd:Q7368" xml:lang="de">Schaf</term></catDesc>
  </category>
</category>
<category xml:id="animalproduct">
  <catDesc><term ref="wd:Q629103" xml:lang="de">Tierisches Produkt</term></catDesc>
  <category xml:id="egg">
     <catDesc><term ref="wd:Q93189" xml:lang="de">Eier</term></catDesc>
  </category>
  <category xml:id="cheese">
     <catDesc><term ref="wd:Q10943" xml:lang="de">Käse</term></catDesc>
  </category>
</category>
</taxonomy>
Code Snippet 17: A <taxonomy> for the representation of the categories "grain", "animal" and "animal product" with their corresponding subordinated categories.

This structure can be transferred to SKOS. So, the example from above would look like this in DEPCHA:

<skos:ConceptScheme rdf:about="https://gams.uni-graz.at/context:depcha.example#Taxonomy">
  <dc:title>Commodities</dc:title>
  <skos:hasTopConcept rdf:resource="https://gams.uni-graz.at/context:depcha.example#grain"/>
  <skos:hasTopConcept rdf:resource="https://gams.uni-graz.at/context:depcha.example#animal"/>
  <skos:hasTopConcept rdf:resource="https://gams.uni-graz.at/context:depcha.example#animalproduct"/>
</skos:ConceptScheme>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#grain">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#rye"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#wheat"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#barley"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#flour"/>
  <skos:prefLabel xml:lang="de">Getreide</skos:prefLabel>
  <rdfs:label>Getreide</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q2995529"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#rye">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#grain"/>
  <skos:prefLabel xml:lang="de">Roggen</skos:prefLabel>
  <rdfs:label>Roggen</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q12099"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#wheat">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#grain"/>
  <skos:prefLabel xml:lang="de">Weizen</skos:prefLabel>
  <rdfs:label>Weizen</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q15645384"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#barley">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#grain"/>
  <skos:prefLabel xml:lang="de">Gerste</skos:prefLabel>
  <rdfs:label>Gerste</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q11577"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#flour">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#wheatflour"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#ryeflour"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#grain"/>
  <skos:prefLabel xml:lang="de">Mehl</skos:prefLabel>
  <rdfs:label>Mehl</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q36465"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#wheatflour">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#flour"/>
  <skos:prefLabel xml:lang="de">Weizenmehl</skos:prefLabel>
  <rdfs:label>Weizenmehl</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q2249305"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#ryeflour">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#flour"/>
  <skos:prefLabel xml:lang="de">Roggenmehl</skos:prefLabel>
  <rdfs:label>Roggenmehl</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q10658708"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#animal">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#goose"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#sheep"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#lamb"/>
  <skos:prefLabel xml:lang="de">Tier</skos:prefLabel>
  <rdfs:label>Tier</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q729"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#goose">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#animal"/>
  <skos:prefLabel xml:lang="de">Gans</skos:prefLabel>
  <rdfs:label>Gans</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q3736439"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#sheep">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#animal"/>
  <skos:prefLabel xml:lang="de">Schaf</skos:prefLabel>
  <rdfs:label>Schaf</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q7368"/>
</skos:Concept>
<skos:Concept
  rdf:about="https://gams.uni-graz.at/context:depcha.example#animalproduct">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#egg"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#cheese"/>
  <skos:prefLabel xml:lang="de">Tierisches Produkt</skos:prefLabel>
  <rdfs:label>Tierisches Produkt</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q629103"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#egg">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#animalproduct"/>
  <skos:prefLabel xml:lang="de">Eier</skos:prefLabel>
  <rdfs:label>Eier</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q93189"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#cheese">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#animalproduct"/>
  <skos:prefLabel xml:lang="de">Käse</skos:prefLabel>
  <rdfs:label>Käse</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q10943"/>
</skos:Concept>
							
Code Snippet 18: Transfer of an XML <taxonomy> to a SKOS structure.

Taxonomies can also be created for services or other intangible commodities.

Units of Measurement

Units of measurement are essential for the description of bk:EconomicAsset. This includes units for volume, area or length, as well as for currencies. According to the TEI guidelines the element <unitDecl> (in the <teiHeader>) contains one or more <unitDef> child elements that serve to describe units of measure. The <unitDecl> element has to be added to the <encodingDesc> element in the <teiHeader>. So, this seems to be very useful to specify historical units in a document - like the Spanish maravedì in the example below that is defined as a historic Iberian currency. With @type it is explicitly identified as a currency. By using @ref we can create a reference to a controlled vocabulary like Wikidata.

<encodingDesc>
  <unitDecl>  
    <unitDef ref="wd:Q1248202" type="currency" xml:id="maravedi" notBefore="1154" to="1854">   
      <label xml:lang="en">Spanish maravedí</label>  
      <region>Spain</region>   
      <unit>maravedí</unit>   
      <desc>Historic Iberian currency</desc>   
    </unitDef>
  </unitDecl>
</encodingDesc>
							
Code Snippet 19: Definition of historic currency using <unitDecl>

In the next snippet we can see an example where dollars, euros and also cents are defined as currencies. While the dollar is used in the United States of America, the euro is used in the region of Europe since 2002. We can use the element <conversion> to express that 100 cents are equivalent to 1 euro. It is also important to identify the "main currency" to be able to transfer aggregations within DEPCHA into one currency. In this case we would like to set the euro as bk:mainCurrency.

<encodingDesc>
  <unitDecl> 
    <unitDef ref="wd:Q4917" type="currency" xml:id="dollar">   
      <label xml:lang="en">American Dollar</label>  
      <region>United States of America</region>      
   <unit>$</unit> 
    </unitDef>
    <unitDef ref="wd:Q4917" type="currency" xml:id="euro" ana="bk:mainCurrency" from="2002">  
      <label xml:lang="en">Euro</label>    
      <region>Europe</region>  
      <unit>€</unit> 
    </unitDef> 
    <unitDef ref="wd:Q2377701" type="currency" xml:id="cent" from="2002">   
      <label xml:lang="en">Cent</label>   
      <region>Europe</region>  
      <unit>c</unit>   
      <conversion fromUnit="#euro" toUnit="#cent" formula="$fromUnit div 100"/> 
    </unitDef>
  </unitDecl>
</encodingDesc>
							
Code Snippet 20: Declaration of a bk:mainCurrency

In the RDF below that was generated from the snippet above we can see that for euro and cent we can find a bk:MonetaryUnit which contains information about the temporal and spatial dimension. Additionally, we can see the depcha:Dataset defining the corresponding main currency for every RDF dataset as well as all currencies in the document.

You might have noticed also the attribute @formula in the <conversion> element. This attribute helps us to set conversion rules for a certain unit of measurement. It is not bound to currencies and this particular information will be a part of the class bk:Conversion. To get it properly transferred to the RDF the @formula must look like in the snippet above. It needs the attributes @fromUnit and @toUnit which here contain the @xml:id from the <unitDef>. The formula itself always has to be a division. For historic currencies like shilling and pence from our very first example the formula would look like this: fromUnit="#shilling" toUnit="#penny" formula="$fromUnit div 12", because 12 pence are 1 shilling.

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.units#Dataset">
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#dollar"/>
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#euro"/>
  <depcha:isMainCurrency rdf:resource="https://gams.uni-graz.at/context:depcha.example#euro"/>
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#cent"/>
</depcha:Dataset> 
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#dollar">  
  <rdfs:label>American Dollar</rdfs:label>        
  <dc:coverage>United States of America</dc:coverage>
</bk:MonetaryUnit>
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#euro">       
  <rdfs:label>Euro</rdfs:label>
  <time:hasTime>
    <time:TemporalEntity rdf:about="https://gams.uni-graz.at/context:depcha.example#euroTE">
     <time:hasBeginning>2002</time:hasBeginning>   
    </time:TemporalEntity>         
  </time:hasTime>         
  <dc:coverage>Europe</dc:coverage>
</bk:MonetaryUnit>
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#cent"> 
  <rdfs:label>Cent</rdfs:label> 
  <time:hasTime>    
    <time:TemporalEntity rdf:about="https://gams.uni-graz.at/context:depcha.example#centTE"> 
      <time:hasBeginning>2002</time:hasBeginning>  
    </time:TemporalEntity>
  </time:hasTime>
  <dc:coverage>Europe</dc:coverage> 
</bk:MonetaryUnit> 
<bk:Conversion rdf:about="https://gams.uni-graz.at/context:depcha.example#centConversion"> 
  <bk:convertsFrom rdf:resource="https://gams.uni-graz.at/context:depcha.example#euro"/>         
  <bk:convertsTo rdf:resource="https://gams.uni-graz.at/context:depcha.example#cent"/>         
  <bk:formula>$fromUnit div 100</bk:formula>         
  <bk:divider>100</bk:divider>
</bk:Conversion>
Code Snippet 21: Transfer of currency information from XML to RDF.

Let's look into an example for another unit. With @type in <unitDef> we are able to define the category of the unit. If there are no indications of the category which means that there is no @type attribute in the <unitDef> element, it will be transferred by default as bk:Unit that serves as superclass and stands for all units of measurement. The following @type are supported: type="weight", type="volume", type="length", type="capacity", type="time", type="currency", type="surface".

<unitDecl>
  <unitDef ref="wd:Q100995" type="weight" xml:id="pfund">   
    <label xml:lang="de">Pfund</label>
  </unitDef>
  <unitDef ref="wd:Q137958" type="volume" xml:id="muett">  
    <label xml:lang="de">Mütt</label>
  </unitDef>
  <unitDef ref="wd:Q482798" type="length" xml:id="unit.7">   
    <label xml:lang="en">yard</label>   
    <label xml:lang="de">Yard</label>
  </unitDef>
  <unitDef ref="wd:Q351646" type="capacity" xml:id="unit.15">   
    <label xml:lang="en">peck</label>   
    <label xml:lang="de">Peck</label>
  </unitDef>
  <unitDef ref="wd:Q573" type="time" xml:id="unit.12">   
    <label xml:lang="en">days</label>   
    <label xml:lang="de">Tage</label>
  </unitDef>
</unitDecl>
Code Snippet 22: Defining units of measurement and linking them to Wikidata concepts.
Booking (Debit & Credit)

To enrich your booking account with the information of a bk:Booking about being a credit or debit you can add ana="bk:debit" or ana="bk:credit" to a TEI element. A suitable place for this annotation is the textual information that indicates the debtor or creditor. In the example below the debtor is marked with a D and we can find it behind Eliza Wheaton's surname.

<table>  
  <row ana="bk:entry">   
    <cell>522</cell>    
    <cell>      
      <name ana="bk:from" ref="#pers_WCDH001" type="person">Eliza Wheaton</name>    
      <span> 
        <choice>          
          <abbr ana="bk:debit">D</abbr>       
          <expan>debtor</expan>         
        </choice>    
      </span>
      <lb/> To <name ana="bk:to" ref="#pers_WCDH002" type="account">cash $20.00 </name>     
    </cell>     
    <cell>     
      <measure ana="bk:money" quantity="20" unit="dollar">20</measure>    
    </cell>  
    <cell> 00 </cell>  
    <cell/>    
    <cell/>   
  </row> 
<table>
Code Snippet 23: Expressing the debit side with bk:debit inside the bk:entry.

But what if the debit or credit side is not expressed inside a bk:entry like in our transcription example from the beginning:

Stagville August 1st 1808
69 James Haley Self Dr.
1/4 lb Powder 2/6 1 lb Shot 2/6 1 lb Sugar 2/6 7 6

James Haley is indicated as debtor by the Dr. after his name. The booking information always has to be inside a bk:entry. So, in this case we can add the bk:debit right next to bk:entry in the <row> element, even though the textual information about the debtor can be found in the <head> element.

<head><name ana="bk:to" ref="#economic_unit.1">Stagville</name> August 1st 1808</head>
<table>
  <head>69 <name ana="bk:from" ref="#economic_unit.2">James Haley</name> J Self Dr.</head>
  <row ana="bk:entry bk:debit">
    <cell>
      <measure>1/4 lb Powder</measure>
      <measure>1 lb Shot</measure>
      <measure>1 lb Sugar</measure>
    </cell>
    <cell/>
    <cell>
      <measure>7</measure>
    </cell>
    <cell>
      <measure>6</measure>
    </cell>
  </row>
</table>
							
Code Snippet 24: Booking information like bk:debit or bk:credit always have to be inside a bk:entry.
Status & Agent

Here is another example of a transcription of a bk:entry. The entry in the Wheaton day book looks like this:

Monday September 15th 1828
settled Derius Drake D
To ax dlvd By Puffer 9/1
By cutting two sticks
1 59 6

For editing accounts two further entities may be relevant, according to the questions: 'What is the transaction status?' and 'Are other people involved in the transaction?' In this example the status of the transaction is "settled" which means it is paid. This can be expressed by bk:status.

The second entity is about the involvement of a third person. In this example the text “By Puffer" can be interpreted as an information about someone who is carrying out the transaction for someone else. Adding @ana="bk:agent" helps annotating the person as a bk:Agent. As we can see a person named Derius Drake worked for Wheaton (owner of the shop and main author of the day book). Derius Drake paid his debt of 1 pound 59 shillings and 6 pence with his work by cutting two sticks. To do the job he got an axe which was delivered by a person called Puffer that represents another bk:Agent .

<table>
  <head>Monday <date ana="bk:when" when="1828-09-15">September-15th-1828</date></head>
  <row>  
    <cell><span ana="bk:status">settled</span></cell> 
    <cell>    
      <name ana="bk:to" ref="#pers_WCDH276">Derius Drake</name>   	
      <span ana="bk:debit">D </span>To ax dlvd By   	
      <name ana="bk:agent" ref="#pers_WCDH280">Puffer</name> 9/1  
    </cell> 
    <cell><measure ana="bk:money" commodity="currency" quantity="1" unit="pound">1</measure></cell> 
    <cell><measure ana="bk:money" commodity="currency" quantity="59" unit="shilling">59</measure></cell> 
    <cell><measure ana="bk:money" commodity="currency" quantity="6" unit="pence">6</measure></cell> 
    <cell/>
  </row>
</table>
							
Code Snippet 25: Declaring bk:status and bk:agent of a transaction.
Places

The annotation bk:where can be used to express locations as bk:Place that are associated with transactions. However, it is important to note that this connection to a place is not specified any further. So, don't expect to find a reference to a place inside the <bk:Transaction> element in the RDF. Just add ana="bk:where" to a <place> and also consider referencing it to a <listPlace> element in the <teiHeader>.

<listPlace ana="bk:index">
  <place xml:id="manorKasten">  
    <placeName>Kasten</placeName>  
    <location> 
      <country>Italien</country>   
      <settlement>Kastelbell</settlement> 
      <geo>46.63455486353947, 10.91606818862674</geo>  
    </location>
  </place>
</listPlace>
<!-- ... -->
<p>
  <seg ana="bk:entry">Item so hatdo <name ref="pers_SR009" type="person" ana="bk:from"> 
  michel under weg</name> geben <measure ana="bk:commodity" commodity="rye"    
  quantity="2" unit="muett">2 mütt<lb/> Roken</measure> die gab der   
  <name ref="pers_SR071" type="person" ana="bk:to">parott</name> umb 1 mütt<lb/> arbaid  
  daz kam zw dem <placeName ana="bk:where" ref="#manorKasten">kasten</placeName> in 
  der <lb/> fasten</seg>
</p>
							
Code Snippet 26: Annotation of a place using bk:where.

Without the generation of a <listPlace> that is attributed with bk:index you will not get the <schema:Place> in your RDF and also the bk:Place entities will not be counted in the informative section of the <depcha:Dataset>. Transferring the data to an RDF structure would lead to this result:

<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.places#T1">
  <!-- ... -->
  <bk:where rdf:resource="https://gams.uni-graz.at/o:depcha.example.places#kasten"/>
</bk:Transaction>
<!-- ... -->
<schema:Place rdf:about="https://gams.uni-graz.at/o:depcha.example.places#manorKasten">
  <schema:name>Kasten</schema:name>
  <schema:containedInPlace>Italien</schema:containedInPlace>
  <schema:containedInPlace>Kastelbell</schema:containedInPlace>
  <schema:longitude>46.63455486353947</schema:longitude>
  <schema:latitude>10.91606818862674</schema:latitude>
</schema:Place>
							
Code Snippet 27: Transfer of places annotated with bk:where to an RDF structure.
Prices

To connect bk:Commodity and bk:Price they have to be together inside a <measure> element. We have to create an additional <measure> element that surrounds the numbers or the specific text indicating a price. Additionally, we need to explicitly an @ana with the value bk:price.

<head><name ana="bk:to" ref="#economic_unit.1">Stagville</name> August 1st 1808</head>
<table>
  <head>69 <name ana="bk:from" ref="#economic_unit.2">James Haley</name> J Self Dr.</head>
  <row ana="bk:entry">  
    <cell>    
      <measure><measure ana="bk:commodity" commodity="powder" quantity="0.25" unit="lb">1/4 lb Powder<measure ana="bk:price" >2/6</measure></measure>    
      <measure ana="bk:commodity" commodity="shot" quantity="1" unit="lb">1 lb Shot<measure ana="bk:price">2/6</measure></measure>    
      <measure ana="bk:commodity" commodity="sugar" quantity="1" unit="lb">1 lb Sugar<measure ana="bk:price">2/6</measure></measure> 
    </cell>  
    <cell>   
      <measure ana="bk:commodity" commodity="shoe_knife" quantity="1" unit="piece">1 Shoe knife</measure><measure ana="bk:price">1/6</measure>  
    </cell> 
    <cell/> 
    <cell>  
      <measure ana="bk:money" quantity="7" unit="shilling">7</measure>  
    </cell> 
    <cell>   
     <measure ana="bk:money" quantity="6" unit="pence">6</measure> 
    </cell>
   </row>
</table>
							
Code Snippet 28: Definition of prices using bk:price.
Subtotals & Totals

Furthermore, the Bookkeeping Ontology enables us to express if a monetary value represents a bk:TotalTransaction or a bk:SubtotalTransaction. We only need to add an @ana="bk:total or an @ana="bk:subtotal to an element that surrounds all the bk:money that correspond to the total or subtotal. In the following example the best spot for the bk:subtotal and the bk:total is in the <row> element replacing bk:entry.

<head><name ana="bk:to" ref="#economic_unit.1">Stagville</name> August 1st 1808</head>
<table>
  <head>69 <name ana="bk:from" ref="#economic_unit.2">James Haley</name> J Self Dr.</head>
  <row ana="bk:entry">  
    <cell>    
      <measure><measure ana="bk:commodity" commodity="powder" quantity="0.25" unit="lb">1/4 lb Powder<measure ana="bk:price" >2/6</measure></measure>    
      <measure ana="bk:commodity" commodity="shot" quantity="1" unit="lb">1 lb Shot<measure ana="bk:price">2/6</measure></measure>    
      <measure ana="bk:commodity" commodity="sugar" quantity="1" unit="lb">1 lb Sugar<measure ana="bk:price">2/6</measure></measure> 
    </cell>  
    <cell>   
      <measure ana="bk:commodity" commodity="shoe_knife" quantity="1" unit="piece">1 Shoe knife</measure><measure ana="bk:price">1/6</measure>  
    </cell> 
    <cell/> 
    <cell>  
      <measure ana="bk:money" quantity="7" unit="shilling">7</measure>  
    </cell> 
    <cell>   
     <measure ana="bk:money" quantity="6" unit="pence">6</measure> 
    </cell>
   </row>
   <row ana="bk:entry">
     <cell>
       <measure ana="bk:commodity" commodity="shoeknife" quantity="1">1 Shoe Knife 1/6</measure>
     </cell>
     <cell/>
     <cell>
       <measure ana="bk:money" quantity="1" unit="shilling">1</measure>
     </cell>
     <cell>
       <measure ana="bk:money" quantity="6" unit="pence">6</measure>
     </cell>
   </row>
   <row ana="bk:total">
     <cell/>
     <cell/>
     <cell/>
     <cell><measure ana="bk:money" quantity="9" unit="shilling">9</measure></cell>
     <cell>-</cell>
   </row>
</table>
							
Code Snippet 29: Annotation of bk:subtotal and bk:total to be processed as bk:SubtotalTransaction and bk:TotalTransaction.
Taxes

If we want to categorize a money transfer as a bk:Tax from our ontology, we can add @ana="bk:tax" to the element that expresses a monetary value. In the example bk:tax was used instead of bk:money. The annotation of bk:tax has to be added inside a bk:entry.

<list type="payers">
  <item ana="bk:entry" xml:id="item_mc5_2zg_ghb">
    <seg type="entry">
      <persName ana="bk:from" ref="#RF01">
        <forename>Robert</forename>
        <nameLink>de</nameLink>
        <surname>
          <placeName ref="#geo_Fresviau">fresviau</placeName>
        </surname>
      </persName>
      <roleName ref="#RF01" role="regratier" type="occupation"> regratier
      </roleName>
    </seg>
    <seg type="payment">
      <measure ana="bk:tax" quantity="18" unit="deniers">xviii.d</measure>
    </seg>
    <seg type="status"> p</seg>
  </item>
</list>
							
Code Snippet 30: Annotation of a tax payment using bk:tax.
Accounts & Accountholder

To create a bk:Account we need a <taxonomy> element enriched by ana="bk:account" in which we can express the hierarchy of the accounts (income vs. expenses etc). You can also use a <desc> to describe the account. The income is marked with ana="bk:to" and expenses with ana="bk:from". All the bk:account are associated to the ana="accountHolder". In the snippet below the bk:accountHolder is represented by the revenue office as an institution. So, we have to add bk:accountholder in the index entry of the corresponding bk:EconomicUnit. In the <head> element of the snippet below we can see that the accounts belong to Thomas Walser with an @xml:id reference to <listPerson>.

Every account is embedded into a <div> attributed with an ana="bk:account" and corresp="#income" surrounding another <div> that contains the attributes ana="bk:account" and corresp="#customshauptzoller" referring to the @xml:id in the <taxonomy ana="bk:account">.

<teiHeader>
	<!-- ... -->
  <encodingDesc>  
    <classDecl>    
      <taxonomy ana="bk:account">      
        <category ana="bk:to" xml:id="income">        
          <catDesc>
            <gloss>Einnahmen</gloss>
          </catDesc>        
          <category xml:id="lease">          
            <gloss>Admodiations Gelt</gloss>          
            <desc>This could be a description of the account.</desc>        
          </category>        
          <category xml:id="customshauptzoller">          
            <gloss>Zoll Hauptzoller</gloss>       
          </category>      
        </category>      
        <category ana="bk:from" xml:id="expenses">  
          <catDesc>  
            <gloss>Ausgaben</gloss>
          </catDesc>        
          <category xml:id="useofwoodland">         
            <catDesc>
              <gloss>Waldamtsnutzung</gloss>
            </catDesc>          
            <category xml:id="chamois"> 
              <catDesc>
                <gloss>Gams</gloss>
              </catDesc>         
            </category>          
            <category xml:id="rabbit">            
              <catDesc>
                <gloss>Hasen</gloss>
              </catDesc>          
            </category>        
          </category>     
        </category>    
      </taxonomy>
    </classDecl>
  </encodingDesc>
  <profileDesc>  
    <particDesc>    
      <listPerson ana="bk:index">   
        <person xml:id="pers_1">        
          <name><forename>Peter</forename>  
          <surname>Walser</surname></name>   
          <occupation>Alter Landtammann</occupation>       
        </person>   
      </listPerson>  
      <listOrg ana="bk:index">  
        <org xml:id="org_1" ana="bk:accountHolder">  
          <orgName>Rentamt des Fürstentums Liechtenstein</orgName>     
        </org>  
      </listOrg>
    </particDesc>
  </profileDesc>
</teiHeader>
<text>
  <body>
    <div ana="bk:account" corresp="#income">
      <div ana="bk:account" corresp="#customshauptzoller">
        <note>No. 2</note>
        <head> Von dem Haupt Zollner Liechtenstein <name ana="bk:from" ref="#pers_1">Thomas
               Walser</name></head>
        <p ana="bk:entry"> Von <date ana="bk:when" from="1718-10-22" to="1718-11-22">1. und
              respective 22. Octobris bis 22. Novembris 1718</date>
            <measure ana="bk:money" quantity="48" unitRef="#fl">48</measure>
            <measure ana="bk:money" quantity="25" unitRef="#kr">25</measure>
        </p>
        <p ana="bk:entry">von <date ana="bk:when" from="1718-11-22" to="1718-12-22">22.
              Novembris bis 22 Decembris</date>
            <measure ana="bk:money" quantity="60" unitRef="#fl">60</measure>
            <measure ana="bk:money" quantity="15" unitRef="#kr">15</measure>
            <measure ana="bk:money" quantity="0.25" unitRef="#d">1/4</measure>
        </p>
        <fw ana="bk:subtotal"> Latus <measure ana="bk:money" quantity="1689" unitRef="#fl"
              >1689</measure>
        </fw>
      </div>
   </div>
   <div ana="bk:account" corresp="#expenses">
     <div ana="bk:account" corresp="#useofwoodland">
       <head>Wald Ambts Nuzung</head>
         <div ana="bk:account" corresp="#chamois">
           <note>48</note>
           <head>Umb gambs</head>
           <div ana="bk:entry">
             <p>nach Specification bey laag ausz <measure type="quantity"><measure
                 quantity="12">12</measure></measure><measure commodity="chamois"
                 >gambs</measure>gewlöset worden</p>
             <fw><measure ana="bk:money" quantity="21" unitRef="#fl">21</measure><measure
                 ana="bk:money" quantity="50" unitRef="#kr">50</measure><measure
                 ana="bk:money" quantity="41" unitRef="#d"
                 ><unclear>41</unclear></measure>
             </fw>
           </div>
        </div>
        <div ana="bk:account" corresp="#rabbit">
          <note>49</note>
          <head>Umb Haszen</head>
          <div ana="bk:entry">
            <p>Vor <measure quantity="40">Vierzig</measure></p>
            <fw><measure ana="bk:money" quantity="8" unitRef="#fl">8</measure></fw>
          </div>
        </div>
           <fw ana="bk:subtotal">Latus<measure ana="bk:money" quantity="29" unitRef="#fl"
                 >29</measure><measure ana="bk:money" quantity="50" unitRef="#kr"
                 >50</measure><measure ana="bk:money" quantity="11" unitRef="#d"
                 >11</measure>
           </fw>
        <div>
          <p ana="bk:total"><measure ana="bk:money" quantity="29" unitRef="#fl"
               >29</measure><measure ana="bk:money" quantity="50" unitRef="#kr"
               >50</measure><measure ana="bk:money" quantity="11" unitRef="#d"
               >11</measure></p>
        </div>
      </div>
    </div>
  </body>
</text>
							
Code Snippet 31: Creating one or more bk:Account.
Definition of Prefixes

As the prefix bk: is used as abbreviation in @ana, we need to define it in a <prefixDef> element in the <teiHeader>. You may just copy it from this snippet. If you are using also other controlled vocabularies or LOD resources, you can define their prefixes here as well. For instance, in the example below the abbreviation "wd" is defined as a prefix for Wikidata concepts and can now be used in @ana.

<encodingDesc>
  <listPrefixDef>
    <prefixDef ident="bk" matchPattern="([(a-z)|(A-Z)]+)"
      replacementPattern="https://gams.uni-graz.at/o:depcha.bookkeeping#$1">
      <p> Analytical descriptors are considered to represent concepts from the DEPCHA
        bookkeeping ontology and can be extended to respective URIs. </p>
    </prefixDef>
    <prefixDef ident="wd" matchPattern="([(a-z)|(A-Z)]+)"
      replacementPattern="http://www.wikidata.org/wiki/$1">
      <p>
        <ref target="https://www.wikidata.org/wiki/Help:Namespaces"/>
      </p>
    </prefixDef>
  </listPrefixDef>
</encodingDesc>
							
Code Snippet 32: Using <prefixDef> to define prefixes and to be able to refer to ontologies or controlled vocabularies.
Metadata

For every TEI document you can use the <msDesc> in the <teiHeader> to define some Metadata for your document.

<msDesc>
  <msIdentifier>  
    <country>USA</country> 
    <settlement>Wheaton</settlement>  
    <institution>Madeleine Clark Wallace Library, Wheaton College</institution> 
    <collection>Marion B. Gebbie Archives and Special Collections</collection> 
    <idno>ABC 1.2</idno>  
    <msName>Laban Morey Wheaton Day Book</msName>
  </msIdentifier>
  <msContents>  
    <msItem>  
      <title>Laban Morey Wheaton Day Book</title> 
      <docAuthor>Laban Morey Wheaton</docAuthor>   
      <docDate>1828-1859</docDate> 
      <textLang>      
        <lang>English</lang>   
      </textLang> 
    </msItem>
  </msContents>
</msDesc>
							
Code Snippet 33: Adding Metadata with <msDesc>.

This metadata will also be transferred to your RDF in the <depcha:Dataset>. Thus, the information from the XML/TEI snippet above would look like this in the RDF:

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.#Dataset">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example."/>
  <dc:creator>Laban Morey Wheaton</dc:creator>
  <dc:date>1828-1859</dc:date>
  <dc:language>English</dc:language>
  <dc:title>Laban Morey Wheaton Day Book</dc:title>
  <dc:source>USA, Wheaton, Madeleine Clark Wallace Library, Wheaton College, Marion B. Gebbie
    Archives and Special Collections, ABC 1.2, Laban Morey Wheaton Day Book </dc:source>
  <!-- ... -->
</depcha:Dataset>
							
Code Snippet 34: Metadata information retrieved from the <teiHeader> in the XML/TEI.
Examples

This section will be about some annotation examples from different historic accounting books. It should help to get a better picture of how TEI documents that differ a lot in their structure can be mapped onto the Bookkeeping Ontology.

1. Schlandersberger Rechnungen, 1402

Let's start with a snippet from the Schlandersberger Accounts dated back to the beginnings of the 15th century.

<teiHeader>
 <!-- ... -->
  <profileDesc>
    <particDesc>
      <listPerson ana="bk:index">
        <head> Prosopography </head>
        <desc> Persons named in the Schlandersberger Accounts </desc>
        <person xml:id="pers_SR001">
          <persName>
            <forename>Hans </forename>
            <surname>Kelner </surname>
            <addName>Buchhalter/Verwalter</addName>
          </persName>
        </person>
        <!-- ... -->
        <person xml:id="pers_SR051">
          <persName>
            <forename>Anderlein </forename>
            <addName>Fischer </addName>
          </persName>
        </person>
        <person xml:id="pers_SR052">
          <persName>
            <forename>Herr </forename>
            <surname>Kaspar </surname>
            <addName>Herr von Hans Kelner </addName>
          </persName>
        </person>
        <!-- ... -->
      </listPerson>
    </particDesc>
  </profileDesc>
</teiHeader>
<text>
  <body>
    <div type="example">
      <p> Nota das ist die zetel<lb/> Raigister 1 des <name ref="#pers_SR001"
        type="person" ana="bk:to"> hans <damage><supplied reason="missing"
          >[kelner]</supplied></damage></name>
      </p>
      <p ana="bk:entry"> Item am <date ana="bk:when" when="1402-01-01">s<supplied
        reason="missing">[o]</supplied>nntag nach Eibnitÿ []</date> prachten dÿ<lb/>
        <name ref="#pers_SR051" ana="bk:from bk:group">obgeschriben visser</name>
        <measure ana="bk:commodity" commodity="fish" quantity="18" unit="pound">18 lb
          visch</measure> und<lb/> am mitwoch dar nach Rait <name ref="pers_SR052"
            type="person">herr Kaspar</name><lb/> gen phenïs. </p>
    </div>
  </body>
</text>
							
Code Snippet 35: Mapping the Schlandersberger Accounts to the Bookkeeping Ontology.

In the first paragraph of this example we can see that the person hans was annotated with the TEI element <name> that describes hans [kelner] as a person. To add more information about him in a <listPerson> or to be able to show that this hans is the same like a maybe differently spelled "Hanse" in another bk:entry a reference to an xml:id was added. This reference leads us to a <listPerson> in the <teiHeader>. The ana="bk:to" tells us that he is the beneficiary of this transaction as something is transferred to him. The following paragraph is attributed as bk:entry. We can find a bk:when there that suggests that the s[o]nntag nach Eibnitÿ is the 1st of January, 1402. For the annotation of the obgeschriben visser the TEI element <name> was used carrying another reference to an xml:id and describing the visser as a group of people (bk:group) that is giving something away (bk:from). The <measure> element gives us more information about the bk:EconomicGood that is traded. In this case we can use TEI attributes that help us clarifying that the bk:Commodity is fish that weighs 18 pounds - textually represented by 18 lb visch. At the end of the paragraph another person is mentioned, but as this herr Kaspar does not have any further relevant bk: annotations he does not have a function in this bk:entry.

The RDF that we can generate from our example would look like this:

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.schlandersberger#Dataset">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.schlandersberger"/>
  <depcha:numberOfTransactions>1</depcha:numberOfTransactions>
  <depcha:numberOfEconomicUnits>2</depcha:numberOfEconomicUnits>
  <depcha:numberOfMonetaryValues>0</depcha:numberOfMonetaryValues>
  <depcha:numberOfEconmicGoods>1</depcha:numberOfEconmicGoods>
  <depcha:accountHolder rdf:resource="https://gams.uni-graz.at/context:depcha.example#"/>
</depcha:Dataset>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.schlandersberger#T1">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.schlandersberger"/>
  <bk:entry>Item am s [o] nntag nach Eibnitÿ [] prachten dÿ obgeschriben visser 18 lb visch
    und am mitwoch dar nach Rait herr Kaspar gen phenïs.</bk:entry>
  <bk:when>1402-01-01</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.schlandersberger#T1T1">
      <bk:transfers>
        <bk:Commodity
          rdf:about="https://gams.uni-graz.at/o:depcha.example.schlandersberger#T1T1EA">        
  <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#pound"/>
          <bk:quantity>18</bk:quantity>
          <bk:classified
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#fish"/>
        </bk:Commodity>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_SR001"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_SR051"/>
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_SR001">
  <foaf:givenName>Hans</foaf:givenName>
  <foaf:familyName>Kelner</foaf:familyName>
  <schema:additionalName>Buchhalter/Verwalter</schema:additionalName>
  <rdfs:label>Hans Kelner Buchhalter/Verwalter</rdfs:label>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_SR051">
  <foaf:givenName>Anderlein</foaf:givenName>
  <schema:additionalName>Fischer</schema:additionalName>
  <rdfs:label>Anderlein Fischer</rdfs:label>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_SR052">
  <foaf:givenName>Herr</foaf:givenName>
  <foaf:familyName>Kaspar</foaf:familyName>
  <schema:additionalName>Herr von Hans Kelner</schema:additionalName>
  <rdfs:label>Herr Kaspar Herr von Hans Kelner</rdfs:label>
</bk:EconomicUnit>
							
Code Snippet 36: RDF transformation of the Schlandersberger Accounts.

The RDF first contains some information about the dataset and gives an overview of the number of transactions, economic units and economic goods etc. Moreover, it contains all the annotated information about the bk:Transaction as well as about the bk:EconomicUnit. In the bk:Transaction we can find information about the collection our dataset belongs to in bk:isMemberOf and also to which project it belongs in bk:isPartOf. The next element shows us the exact wording of the paragraph that was annotated as bk:entry. Next, we can see the normalized date of the transaction in bk:when and in the bk:consistsOf all the bk:Transfer of this transaction are listed - in this example it is only one that gets the identifier T1T1 (Transaction N°1, Transfer N°1). Hereunder we can find all the important details of the transfer: the commodity with the identifier T1T1EA (Transaction N°1, Transfer N°1, Economic Asset - numeration will be added automatically when there is more than one commodity), the unit of measurement that is pounds, the quantity as a number and the classification as fish. Also, the direction of the flow of goods is extracted from the TEI and displayed in the RDF. In the last part we can find details about the bk:EconomicUnit. This section and the detail information about a <person> is only provided if you annotate the <listPerson> with a bk:index. As you might have noticed it shows us three bk:EconomicUnit entries, because all the <person> elements are selected, but the <depcha:Dataset> section at the beginning indicates that only 2 of those 3 were involved into the bk:Transaction.

2. Tax Rolls of Medieval Paris (Philip the Fair), 1297

Our second example shows the annotation of tax accounts. For the specification of a money transfer we can use bk:tax instead of bk:money in the section that describes our bk:Transaction. Let's analyze the following snippet:

<teiHeader>
  <!-- ... -->
  <encodingDesc>
  <listPrefixDef>
    <!-- ... -->
  </listPrefixDef>
  <unitDecl>
    <unitDef type="currency" xml:id="livre" ana="bk:mainCurrency">
      <label xml:lang="en">livre</label>
      <country>France</country>
      <conversion fromUnit="#livre" toUnit="#sou" formula="$fromUnit div 20"/>
      <conversion fromUnit="#livre" toUnit="#denier" formula="$fromUnit div 240"/>
    </unitDef>
    <unitDef type="currency" xml:id="sou">
      <label xml:lang="en">sou</label>
      <country>France</country>
    </unitDef>
    <unitDef type="currency" xml:id="denier">
      <label xml:lang="en">denier</label>
      <country>France</country>
    </unitDef>
  </unitDecl>
  </encodingDesc>
  <profileDesc>
    <langUsage>
    <language ident="fr">French</language>
    </langUsage>
    <particDesc>
    <listPerson ana="bk:index">
      <person xml:id="P04" ana="bk:to">
        <persName key="Philippe IV &apos;le Bel&apos;, roi de France" type="reg">
          <forename>Philippe</forename>
          <genName>IV</genName>
          <addName>le Bel</addName>
          <nameLink>de</nameLink>
          <placeName>France</placeName>
        </persName>
        <persName key="Philippe IV" type="short"/>
        <persName source="#head_gd4_qbh_ghb" when="1313">
          <roleName>roy nostre sires</roleName>
        </persName>
        <persName source="#item_m25_2zg_ghb" when="1313">
          <roleName>le Roy</roleName>
        </persName>
        <idno type="viaf">https://viaf.org/viaf/89086248</idno>
        <idno type="wikidata">https://www.wikidata.org/wiki/Q130969</idno>
        <sex value="male"/>
        <birth from="1268-04" to="1268-06"/>
        <death when="1314-11-29"/>
        <state from="1285-10-05" to="1314-11-29" type="office">
          <label type="style">Roi de <placeName ref="#geo_France"
            >France</placeName>
          </label>
        </state>
        <state from="1284-08-16" to="1305-04-04" type="office">
          <label type="style">Roi de <placeName ref="#Navarre">Navarre</placeName>
          </label>
        </state>
      </person>
      <!-- ... -->
      <person xml:id="PR01">
        <persName source="#item_yc5_2zg_ghb" when="1313">
          <forename>Phelippe</forename>
          <nameLink>de</nameLink>
          <surname>
            <placeName ref="#geo_Reims">Reins</placeName>
          </surname>
        </persName>
        <persName cert="medium" source="#item_bdj_d5h_3hb" when="1297">
          <forename>Phellippe</forename>
          <nameLink>le</nameLink>         
 <surname>
            <roleName>chandelier</roleName>
          </surname>
        </persName>
        <persName source="#item_cqc_qgn_3hb" when="1296">
          <forename>Phelippe</forename>
          <nameLink>le</nameLink>
          <surname>
            <roleName>chandelier</roleName>
          </surname>
        </persName>
        <sex value="male"/>
        <occupation role="chandelier" source="#item_yc5_2zg_ghb" when="1313">
          <desc type="source">chandelier</desc>
        </occupation>
        <occupation role="chandelier" source="#item_bdj_d5h_3hb" when="1297">
          <desc type="source">chandelier</desc>
        </occupation>
        <occupation role="chandelier" source="#item_cqc_qgn_3hb" when="1296">
          <desc type="source">chandelier</desc>
        </occupation>
      </person>
      <!-- ... -->
      <person xml:id="RN04">
        <persName source="#item_cdj_d5h_3hb" when="1297">
          <forename>Remi</forename>
          <nameLink>des</nameLink>
          <surname>napes</surname>
        </persName>
        <persName source="#item_zpc_qgn_3hb" when="1296">
          <forename>Remi</forename>
          <nameLink>des</nameLink>
          <surname>napes</surname>
        </persName>
      </person>
    </listPerson>
    </particDesc>
  </profileDesc>
</teiHeader>
<text>
<body>
  <div type="example">
    <head>Tax Rolls of Medieval <placeName>Paris</placeName> 1297 (<name ana="bk:to"
      ref="#P04">Philip the Fair</name>)</head>
    <list>
      <head xml:id="head_kcj_d5h_3hb">
        <locus n="1" target="#bib_Mich1297"/>Cest le livre de la taille des cent
        mille livres tournois pour la q<ex>u</ex>inte annee assise <date
          ana="bk:when" when="1297">l&apos;an mcc iiii <seg rend="superscript"
            >xx</seg> et dis et sept</date>
      </head>
      <item ana="bk:entry" xml:id="item_bdj_d5h_3hb">
        <seg type="entry">
          <persName ana="bk:from" cert="medium" ref="#PR01">
            <forename>Phellippe</forename>
            <nameLink>le</nameLink>
            <surname>
              <roleName ref="#PR01" role="chandelier" type="occupation"
                >chandelier</roleName>
            </surname>
          </persName>
        </seg>
        <seg type="payment">
          <measure ana="bk:tax" quantity="8" unit="sou">viii s</measure>
        </seg>
        <seg type="status">p</seg>
      </item>
      <item ana="bk:entry" xml:id="item_cdj_d5h_3hb">
        <seg type="entry">
          <persName ana="bk:from" ref="#RN04">
            <forename>Remi</forename>
            <nameLink>des</nameLink>
            <surname>napes</surname>
          </persName>
        </seg>
        <seg type="payment">
          <measure ana="bk:tax" quantity="24" unit="sou">xxiiii s</measure>
        </seg>
      </item>
    </list>
  </div>
</body>
</text>
							
Code Snippet 37: Annotation of the Tax Rolls in the context of the bookkeeping ontology.

In the <head> we can find a <name> element that is attributed with ana="bk:to" and therefore provides the information that Philip the Fair is an bk:EconomicUnit receiving something which in this case is a bk:Money in form of a bk:Tax. Inside the two <item> elements which each express a bk:entry we have two different bk:EconomicUnit: Phellippe le chandelier and Remi des napes. Both of them are defined as bk:from - so, their accounts decrease as they transfer money to Philip the Fair. All three persons have a reference that supports the annotation of further information to this persons in the <listPers> section that can be annotated with a bk:index if you wish to extract the person details to the RDF. Now, another essential information in any bk:Transaction is about which bk:EconomicAsset entities are involved. In this case we can see that the <measure> elements in the two bk:entry each contain a bk:Money: 8 sou in the first and 24 sou in the second transaction. To normalize each bk:Money the TEI attributes @quantity and @unit were used. We can find further details about the currency in the <teiHeader> in the <unitDecl> section. The livre was annotated as bk:mainCurrency and there is also information regarding the conversion available in the <unitDef> element that covers the livre. The @formula shows us that converting livre to sou would need a division by 20. So, in reverse this means 20 sou add up to 1 livre. Moreover, we can also find a bk:Conversion from livre to denier as we always have to use the bk:mainCurrency as value in the @fromUnit for conversions. There is no bk:EconomicAsset Phellippe and Remi receive in return - a typical characteristic of taxes. The letter p right under the monetary segment of the first bk:entry is attributed with type="status" and tells us that Phellippe already paid his taxes. For Remi we do not have any information about his payment status. And last but not least this snippet also contains temporal details - in the second <head> that can be found inside the we can find inside the <list> element contains a <date> with an ana="bk:when" that identifies the textual segment l'an mcc iiii xx et dis et sept as the year 1297.

After a transformation to an RDF the annotated TEI extract from above would look like this:

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#Dataset">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.taxrolls"/>
  <depcha:numberOfTransactions>2</depcha:numberOfTransactions>
  <depcha:numberOfEconomicUnits>3</depcha:numberOfEconomicUnits>
  <depcha:numberOfMonetaryValues>2</depcha:numberOfMonetaryValues>
  <depcha:numberOfEconmicGoods>0</depcha:numberOfEconmicGoods>
  <depcha:accountHolder rdf:resource="https://gams.uni-graz.at/context:depcha.example#"/>
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#livre"/>
  <depcha:isMainCurrency rdf:resource="https://gams.uni-graz.at/context:depcha.example#livre"/>
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#sou"/>
  <depcha:currency rdf:resource="https://gams.uni-graz.at/context:depcha.example#denier"/>
</depcha:Dataset>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T1">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.taxrolls"/>
  <bk:entry>Phellippe le chandelier viii s p</bk:entry>
  <bk:when>1297</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T1T1">
      <bk:transfers>
        <bk:Tax rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T1T1EA">
          <bk:unit rdf:resource="https://gams.uni-graz.at/context:depcha.example#sou"/>
          <bk:quantity>8</bk:quantity>
        </bk:Tax>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#P04"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#PR01"/>
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T2">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.taxrolls"/>
  <bk:entry>Remi des napes xxiiii s</bk:entry>
  <bk:when>1297</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T2T1">
      <bk:transfers>
        <bk:Tax rdf:about="https://gams.uni-graz.at/o:depcha.example.taxrolls#T2T1EA">
          <bk:unit rdf:resource="https://gams.uni-graz.at/context:depcha.example#sou"/>
          <bk:quantity>24</bk:quantity>
        </bk:Tax>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#P04"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#RN04"/>
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#P04">
  <foaf:givenName>Philippe</foaf:givenName>
  <t:genName>IV</t:genName>
  <schema:additionalName>le Bel</schema:additionalName>
  <t:nameLink>de</t:nameLink>
  <t:placeName>France</t:placeName>
  <rdfs:label>Philippe IV le Bel de France</rdfs:label>
  <schema:gender rdf:resource="https://schema.org/Male"/>
  <schema:birthDate/>
  <schema:deathDate>1314-11-29</schema:deathDate>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#PR01">
  <foaf:givenName>Phelippe</foaf:givenName>
  <t:nameLink>de</t:nameLink>
  <foaf:familyName>Reins</foaf:familyName>
  <rdfs:label>Phelippe de Reins</rdfs:label>
  <schema:gender rdf:resource="https://schema.org/Male"/>
  <schema:hasOccupation>chandelier</schema:hasOccupation>
  <schema:hasOccupation>chandelier</schema:hasOccupation>
  <schema:hasOccupation>chandelier</schema:hasOccupation>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#RN04">
  <foaf:givenName>Remi</foaf:givenName>
  <t:nameLink>des</t:nameLink>
  <foaf:familyName>napes</foaf:familyName>
  <rdfs:label>Remi des napes</rdfs:label>
</bk:EconomicUnit>
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#livre">
  <rdfs:label>livre</rdfs:label>
  <dc:coverage>France</dc:coverage>
  <dc:coverage>France</dc:coverage>
</bk:MonetaryUnit>
<bk:Conversion rdf:about="https://gams.uni-graz.at/context:depcha.example#livreConversion">
  <bk:convertsFrom rdf:resource="https://gams.uni-graz.at/context:depcha.example#livre"/>
  <bk:convertsTo rdf:resource="https://gams.uni-graz.at/context:depcha.example#sou"/>
  <bk:formula>$fromUnit div 20</bk:formula>
  <bk:divider>20</bk:divider>
</bk:Conversion>
<bk:Conversion rdf:about="https://gams.uni-graz.at/context:depcha.example#livreConversion">
  <bk:convertsFrom rdf:resource="https://gams.uni-graz.at/context:depcha.example#livre"/>
  <bk:convertsTo rdf:resource="https://gams.uni-graz.at/context:depcha.example#denier"/>
  <bk:formula>$fromUnit div 240</bk:formula>
  <bk:divider>240</bk:divider>
</bk:Conversion>
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#sou">
  <rdfs:label>sou</rdfs:label>
  <dc:coverage>France</dc:coverage>
  <dc:coverage>France</dc:coverage>
</bk:MonetaryUnit>
<bk:MonetaryUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#denier">
  <rdfs:label>denier</rdfs:label>
  <dc:coverage>France</dc:coverage>
  <dc:coverage>France</dc:coverage>
</bk:MonetaryUnit>
							
Code Snippet 38: Result of the RDF transformation of the Tax Roll Example

In the first section about the <depcha:Dataset> we are able to find some general information of the collection and about the results of some counting processes concerning the number of bk:Transaction entities, bk:EconomicUnit entities, bk:EconomicGood entities and so on. For the tax rolls example we can count 2 bk:Transaction, 3 bk:EconomicUnit and there are 2 bk:Money to be counted each in form of a bk:Tax. Nested in the <depcha:Dataset> we can also see a <depcha:isMainCurrency> and 3 <depcha:currency> elements that provide information. The next section of interest is about the bk:Transaction itself. We have two transactions in this example as we had two bk:entry. The first one provides further details about the bk:Transfer from Phellippe to Philip the Fair. Both bk:EconomicUnit are referenced using the @ref attributes from the TEI as identifiers in the bk:from and bk:to elements in the RDF. Another information regarding the bk:Transaction that was retrieved from every single bk:entry in the TEI is about the bk:Money: the bk:unit which is sou and the bk:quantity are extracted from the TEI. In this example we had one money transfer of 8 and another of 24 sou. At the end of the RDF, we can find details on all the bk:EconomicUnit that is retrieved from the <listPerson> as we added a bk:index to it in the TEI. Moreover, all the bk:MonetaryUnit are represented in the RDF plus details referring to the bk:Conversion of the currency that was annotated as bk:mainCurrency in the TEI which in this case was the livre.

3. WardLedger

Let's get into another example of an annotated bookkeeping account. It is an example where the bk:EconomicAsset is a bk:Service and that uses bk:index for bk:Place elements.

<teiHeader>
  <!-- ... -->
  <msDesc>
    <msIdentifier>
      <idno>S.124.3</idno>
    </msIdentifier>
    <msContents>
      <msItem>
        <docAuthor>Thos. W. Ward</docAuthor>
        <docDate>June 1934</docDate>
        <title>Ledger No. 2</title>
        <note>
          <p>Accounts of <orgName ana="bk:from" ref="ThosWardLtd">Thos W. Ward   
         Ltd</orgName> from <date ana="bk:when" when="1934-06-01"
              >June 1934</date>. </p>
        </note>
        <textLang>
          <lang>English</lang>
        </textLang>
      </msItem>
    </msContents>
  </msDesc>
  <listPlace ana="bk:index">
    <place xml:id="barrow">
      <placeName>Barrow</placeName>
      <location>
        <geo decls="#WGS">54.108967 -3.218894</geo>
      </location>
    </place>
    <place xml:id="briton_ferry">
      <placeName>Briton Ferry</placeName>
      <location>
        <geo decls="#WGS">51.632119 -3.824315</geo>
      </location>
    </place>
    <place xml:id="grays">
      <placeName>Grays</placeName>
      <location>
        <geo decls="#WGS">51.478404 0.323015</geo>
      </location>
    </place>
    <!-- ... -->
  </listPlace>
  <listOrg>
    <org xml:id="LeslieGodwinLd">
      <orgName> Leslie &amp; Godwin Ld </orgName>
      <desc>Insurance broker</desc>
    </org>
  </listOrg>
  </sourceDesc>
  </fileDesc>
  <encodingDesc>
    <!-- ... -->
  </encodingDesc>
</teiHeader>
<text>
  <body>
    <div type="example">
      <table>
        <head>Comus<placeName ana="bk:where" ref="#barrow">Barrow</placeName>
        </head>
        <row ana="bk:entry">
          <cell>
            <date ana="bk:when" when="1934-08-01"/>
          </cell>
          <cell>
            <name ana="bk:to" ref="#LeslieGodwinLd">Leslie &amp; Godwin Limited</name>
            <measure ana="bk:service" commodity="Insurance">Insurance for 1 month
              L12500</measure>
          </cell>
          <cell>
            <rs/>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="4" unit="pound">4</measure>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="14" unit="shilling">14</measure>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="5" unit="pence">5</measure>
          </cell>
        </row>
        <row ana="bk:entry">
          <cell>
            <date ana="bk:when" when="1934-08-30"/>
          </cell>
          <cell>
            <name ana="bk:to" ref="#LeslieGodwinLd">Leslie &amp; Godwin Ld</name>
            <measure ana="bk:service" commodity="Insurance">Insurance to Devonport
              to Barrow for 3 months L13000</measure>
          </cell>
          <cell>
            <rs/>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="149" unit="pound">149</measure>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="15" unit="shilling">15</measure>
          </cell>
          <cell>
            <measure ana="bk:money" quantity="3" unit="pence">3</measure>
          </cell>
        </row>
        <!-- ... -->
      </table>
    </div>
  </body>
</text>
							
Code Snippet 39: Extract from the accounting books of the company from Thos. W. Ward.

First of all let's look into <body> to the expression of the bk:Date. It seems that there are no textual representations of the date, but the annotator took the first <cell> of each bk:entry to insert a bk:when and enrich it with a normalized date. The next <cell> in both bk:entry shows the name Leslie & Godwin Ld. The annotator chose the TEI element <name> for adding a bk:to to define the recipient in this bk:Transaction and with a reference that leads us to the <listOrg> in the <teiHeader>. In the same <cell> element we can also find the bk:EconomicAsset that is traded. It is a Insurance for 1 month L12500 in the first bk:entry and a Insurance to Devonport to Barrow for 3 months L13000 in the second bk:entry. Both insurances are defined as a bk:Service and the exact nature of it is specified in the attribute commodity="Insurance". Moreover, we can find a bk:Money in each bk:Transaction. They are compositions of different bk:quantity from different bk:unit - in this case: pound, shilling and pence. And there is one more information that can be mapped onto the Bookkeeping Ontology: the bk:Place. In the <head> of the <table> we can find a <placeName> element that contains not only a bk:where, but also a @ref to establish a connection to the <listPlace> located in the <teiHeader>. There we can also find the attribute ana="bk:index" that will lead to an extraction of the different places in the RDF.

After creating an RDF from this TEI snippet we would get the following result:

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#Dataset">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.wardledger"/>
  <dc:creator>Thos. W. Ward</dc:creator>
  <dc:date>June 1934</dc:date>
  <dc:language>English</dc:language>
  <dc:source>S.124.3 </dc:source>
  <depcha:numberOfTransactions>2</depcha:numberOfTransactions>
  <depcha:numberOfEconomicUnits>2</depcha:numberOfEconomicUnits>
  <depcha:numberOfMonetaryValues>2</depcha:numberOfMonetaryValues>
  <depcha:numberOfEconmicGoods>2</depcha:numberOfEconmicGoods>
  <depcha:numberOfPlaces>1</depcha:numberOfPlaces>
  <depcha:accountHolder rdf:resource="https://gams.uni-graz.at/context:depcha.example#"/>
</depcha:Dataset>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.wardledger"/>
  <bk:entry>Leslie &amp; Godwin Ld Insurance for 1 month L12500 4 14 5</bk:entry>
  <bk:when>1934-08-01</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T1">
      <bk:transfers>
        <bk:Service
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T1EA">
          <bk:unit>piece</bk:unit>
          <bk:quantity>1</bk:quantity>
          <bk:classified
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#insurance"
          />
        </bk:Service>
      </bk:transfers>
      <bk:from
        rdf:resource="https://gams.uni-graz.at/context:depcha.example#LeslieGodwinLd"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#ThosWardLtd"/>
    </bk:Transfer>
  </bk:consistsOf>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T2">
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T2EA1">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#pound"/>
          <bk:quantity>4</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T2EA2">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#shilling"/>
          <bk:quantity>14</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T1T2EA3">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#pence"/>
          <bk:quantity>5</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#ThosWardLtd"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#LeslieGodwinLd"
      />
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.wardledger"/>
  <bk:entry>Leslie &amp; Godwin Ld Insurance to Devonport to Barrow for 3 months L13000 149 15
    3</bk:entry>
  <bk:when>1934-08-30</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T1">
      <bk:transfers>
        <bk:Service
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T1EA">
          <bk:unit>piece</bk:unit>
          <bk:quantity>1</bk:quantity>
          <bk:classified
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#insurance"
          />
        </bk:Service>
      </bk:transfers>
      <bk:from
        rdf:resource="https://gams.uni-graz.at/context:depcha.example#LeslieGodwinLd"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#ThosWardLtd"/>
    </bk:Transfer>
  </bk:consistsOf>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T2">
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T2EA1">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#pound"/>
          <bk:quantity>149</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T2EA2">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#shilling"/>
          <bk:quantity>15</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:transfers>
        <bk:Money
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wardledger#T2T2EA3">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#pence"/>
          <bk:quantity>3</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#ThosWardLtd"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#LeslieGodwinLd"/>
    </bk:Transfer>
  </bk:consistsOf>
</bk:Transaction>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#lesliegodwinld">
  <schema:name>Leslie &amp; Godwin Limited</schema:name>
  <rdfs:label>Leslie &amp; Godwin Limited</rdfs:label>
</bk:EconomicUnit>
<schema:Place rdf:about="https://gams.uni-graz.at/context:depcha.example#barrow">
  <rdfs:label>Barrow</rdfs:label>
  <schema:name>Barrow</schema:name>
  <schema:longitude>54.108967</schema:longitude>
  <schema:latitude>-3.218894</schema:latitude>
</schema:Place>
<schema:Place rdf:about="https://gams.uni-graz.at/context:depcha.example#briton_ferry">
  <rdfs:label>Briton Ferry</rdfs:label>
  <schema:name>Briton Ferry</schema:name>
  <schema:longitude>51.632119</schema:longitude>
  <schema:latitude>-3.824315</schema:latitude>
</schema:Place>
<schema:Place rdf:about="https://gams.uni-graz.at/context:depcha.example#grays">
  <rdfs:label>Grays</rdfs:label>
  <schema:name>Grays</schema:name>
  <schema:longitude>51.478404</schema:longitude>
  <schema:latitude>0.323015</schema:latitude>
</schema:Place>
							
Code Snippet 40: Result of the RDF transformation created from an extract of the booking accounts of Thos. W. Ward.

Once again we start with a quick analysis of the contents of the <depcha:Dataset>. Before we get to the part where some calculations are conducted, we can see that also information from the <msDesc> of our TEI about the creator, the date, the language and the source are extracted and fill up metadata elements from the Dublin Core. After this section we see the results of the arithmetic operations: we do have a total of 2 bk:Transaction entities, 2 bk:EconomicUnit entities, 6 bk:Money entities and 2 bk:EconomicGood entities. As we annotated one place with bk:where inside the <body> of the TEI we can also find a 1 in the <depcha:numberOfPlaces> element. A more specific declaration of the date of each bk:entry can be found in the <bk:when> of each bk:Transaction. The attribution of the two bk:EconomicGood entities in the TEI is reproduced accordingly in the RDF where the insurances are not only defined as bk:Service, but also obtain a bk:classified that helps us understand that the bk:Service traded in this booking account is an insurance. Please note that as there was no clarification on the bk:unit in the annotation of the bk:Service the unit piece was added by default and the bk:quantity was set to 1 automatically. As far as the bk:EconomicUnit are concerned we would like to bring into focus that the bk:to Leslie & Godwin Ld was properly transferred as recipient in both bk:Transaction as well as Thos W. Ward Ltd as the one providing the bk:Service even though he was mentioned only in the <msDesc> of our TEI and not in the <body>. So, it is not always necessary to have all the bk:EconomicUnit in a list as the data can be extracted also from other spots in the TEI. When we look to the end of the RDF, we can also observe that for the <rdfs:label> the textual representation from inside the <bk:entry> was extracted and not the one from the <listOrg> element. Another special characteristic of this RDF transformation is the conversion of the bk:index that was added to the <listPlace>. It resulted in the creation of <schema:Place> elements in the RDF that contain all the coordinates provided in the TEI document.

4. Wheaton

The Laban Morey Wheaton Day Book provides another dataset that was annotated in accordance with the Bookkeeping Ontology. Have a look onto the example before we analyze it.

<teiHeader>
  <!-- ... -->
  <encodingDesc>
    <!-- ... -->
    <classDecl>
      <taxonomy ana="bk:index">
        <category xml:id="c_rye">
          <catDesc>
            <term ref="wd:Q12099" xml:lang="en">rye</term>
          </catDesc>
          <category xml:id="c_springrye">
            <catDesc>
              <term xml:lang="en">spring rye</term>
            </catDesc>
          </category>
        </category>
      </taxonomy>
    </classDecl>
  </encodingDesc>
  <profileDesc>
    <particDesc>
      <listPerson ana="bk:index">
        <person xml:id="pers_WCDH001">
          <persName>
            <forename type="first">Eliza</forename>
            <forename type="middle">Baylies</forename>
            <surname type="birth">Chapin</surname>
            <surname type="married">Wheaton</surname>
            <addName>Wife</addName>
          </persName>
          <birth when="1809-09-27">
            <placeName>
              <geogName>Northbridge Hill</geogName>
              <settlement>Northbridge</settlement>
              <region>Massachusetts</region>
            </placeName>
          </birth>
          <sex value="2"/>
          <residence notBefore="1817">
            <placeName>
              <settlement>Sutton</settlement>
              <region>Massachusetts</region>
            </placeName>
          </residence>
          <residence notBefore="1823">
            <placeName>
              <geogName>Baylies Hill</geogName>
              <settlement>Uxbridge</settlement>
              <region>Massachusetts</region>
            </placeName>
          </residence>
          <education>
            <orgName ref="#org_WCDH2">Uxbridge Academy</orgName>
            <orgName ref="#org_WCDH3">Boston Young Ladies' Academy</orgName>
          </education>
          <faith>Congregational</faith>
          <state notBefore="1829-06-25" type="married" notAfter="1865"/>
          <residence notBefore="1829-06-25">
            <settlement>Norton</settlement>
            <region>Massachusetts</region>
          </residence>
          <death when="1905"/>
        </person>
        <person xml:id="pers_WCDH002" ana="bk:to bk:accountHolder">
          <persName>
            <forename type="first">Laban</forename>
            <forename type="middle">Morey</forename>
            <surname>Wheaton</surname>
            <addName>Husband</addName>
            <addName>Husb.</addName>
          </persName>
          <birth when="1796-09-14">
            <placeName>
              <settlement>Norton</settlement>
              <region>Massachusetts</region>
            </placeName>
          </birth>
          <sex value="1"/>
          <education>
            <orgName notAfter="1817" ref="#org_WCDH4">Brown University</orgName>
          </education>
          <education>read law</education>
          <faith>Congregational</faith>
          <state notBefore="1829-06-25" type="married"/>
          <occupation>  
          <roleName>Postmaster</roleName>
          </occupation>
          <affiliation>
            <roleName>Representative <orgName ref="#org_WCDH5">Massachusetts General
              Court</orgName>
            </roleName>
          </affiliation>
          <occupation>
            <roleName>Member <orgName ref="#org_WCDH6">Massachusetts Governor's
              Council</orgName>
            </roleName>
          </occupation>
          <affiliation>
            <roleName>Trustee</roleName>
            <orgName ref="#org_WCDH7">State Industrial School for Girls</orgName>
          </affiliation>
          <death when="1865">
            <placeName>
              <settlement>Norton</settlement>
            </placeName>
          </death>
        </person>
        <!-- ... -->
        <person xml:id="pers_WCDH699">
          <persName>
            <forename>Samuel</forename>
            <surname>Wrigley</surname>
          </persName>
          <sex value="1"/>
        </person>
        <person xml:id="pers_WCDH700">
          <persName>
            <forename>Samuel</forename>
            <surname>Wrigley</surname>
            <genName>Junior</genName>
          </persName>
          <sex value="1"/>
        </person>
        <person xml:id="pers_WCDH701">
          <persName>
            <roleName>Mrs.</roleName>
            <surname>Wrigley</surname>
          </persName>
          <sex value="2"/>
        </person>     
      </listPerson>
    </particDesc>
  </profileDesc>
</teiHeader>
<text>
  <body>
    <div type="example">           
      <head><name ana="bk:to" ref="#pers_WCDH002">Laban Morey
        Wheaton</name>Laban Morey Wheaton Day Book</head>
      <table>
        <head>
          <date ana="bk:when" when="1828-09-15">Monday September-15th-1828</date>
        </head>
        <row ana="bk:entry">
          <cell ana="bk:status">settled</cell>
          <cell>   
         <name ana="bk:from" type="person" ref="#pers_WCDH699">Samuel
              Wrigley</name>
            <choice>
              <abbr ana="bk:debit">Dr</abbr>
              <expan>Debtor</expan>
            </choice>
            <lb/>To <measure ana="bk:commodity" unit="bushel" quantity="0.5"
              commodity="#c_springrye">1/2 bushel spring Rye</measure> 6/6</cell>
          <cell/>
          <cell>
            <measure ana="bk:money" quantity="53" unit="cent">53</measure>
          </cell>
          <cell/>
          <cell/>
        </row>
      </table>
    </div>
  </body>
</text>
							
Code Snippet 41: A bk:entry from the Wheaton Day Book with rich annotation.

The first thing we find in the <body> is a <name> element enriched with ana="bk:to" telling us that this person is the receiving bk:EconomicUnit and a reference that leads us to <listPerson> for further information about that particular person annotated with a bk:accountHolder in the corresponding <person> element. Scanning the <body> for another bk:EconomicUnit we will find a bk:from in the <name> tag around Samuel Wrigley who is also connected to the <listPerson> with a reference. Right after the <name> element we can also find the information that Samuel Wrigley is the debtor in this bk:Transaction. As this detail was marked as bk:debit we can assure to be represented also in the RDF. Now, the next thing we might be interested in is the bk:EconomicGood of this bk:Transaction. Looking a little bit further we can find it in the element that has a ana="bk:commodity" in it. Through the normalization process we are provided with data about the unit and quantity plus a reference regarding the nature of the commodity that can be found in the <taxonomy> in the <teiHeader>: spring rye. In this case the bk:unit is bushel and the bk:quantity is represented in a float as 0.5. The bk:Money that is exchanged for this bk:EconomicGood is annotated with bk:money and is equivalent to 53 cents. Another important information that can be expressed in accordance with the Bookkeeping Ontology is the bk:status which in this case is settled. And last but not least it is also possible to retrieve temporal details that can be found in the <date> element and only need to be enriched with a bk:when to be fit for a transformation.

The result of a transformation to an RDF format would then look like this:

<depcha:Dataset rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#Dataset">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.wheaton"/>
  <depcha:numberOfTransactions>1</depcha:numberOfTransactions>
  <depcha:numberOfEconomicUnits>2</depcha:numberOfEconomicUnits>
  <depcha:numberOfMonetaryValues>1</depcha:numberOfMonetaryValues>
  <depcha:numberOfEconmicGoods>1</depcha:numberOfEconmicGoods>
  <depcha:accountHolder
    rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_WCDH002"/>
</depcha:Dataset>
<bk:Transaction rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#T1">
  <gams:isMemberOfCollection rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <gams:isPartOf rdf:resource="https://gams.uni-graz.at/o:depcha.example.wheaton"/>
  <bk:entry>settled Samuel Wrigley Dr Debtor To 1/2 bushel spring Rye 6/6 53</bk:entry>
  <bk:when>1828-09-15</bk:when>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#T1T1">
      <bk:transfers>
        <bk:Commodity
          rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#T1T1EA">
          <bk:unit
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#bushel"/>
          <bk:quantity>0.5</bk:quantity>
          <bk:classified
            rdf:resource="https://gams.uni-graz.at/context:depcha.example#c_springrye"/>
        </bk:Commodity>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_WCDH002"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_WCDH699"/>
    </bk:Transfer>
  </bk:consistsOf>
  <bk:consistsOf>
    <bk:Transfer rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#T1T2">
      <bk:transfers>
        <bk:Money rdf:about="https://gams.uni-graz.at/o:depcha.example.wheaton#T1T2EA">
          <bk:unit rdf:resource="https://gams.uni-graz.at/context:depcha.example#cent"/>
          <bk:quantity>53</bk:quantity>
        </bk:Money>
      </bk:transfers>
      <bk:from rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_WCDH699"/>
      <bk:to rdf:resource="https://gams.uni-graz.at/context:depcha.example#pers_WCDH002"/>
    </bk:Transfer>
  </bk:consistsOf>
  <bk:status>settled</bk:status>
  <bk:debit rdf:resource="https://gams.uni-graz.at/o:depcha.bookkeeping#Booking"/>
</bk:Transaction>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_WCDH001">
  <foaf:givenName>Eliza</foaf:givenName>
  <foaf:givenName>Baylies</foaf:givenName>
  <foaf:familyName>Chapin</foaf:familyName>
  <foaf:familyName>Wheaton</foaf:familyName>
  <schema:additionalName>Wife</schema:additionalName>
  <rdfs:label>Eliza Baylies Chapin Wheaton Wife</rdfs:label>
  <schema:birthDate>1809-09-27</schema:birthDate>
  <schema:gender rdf:resource="https://schema.org/Male"/>
  <schema:homeLocation>SuttonMassachusetts</schema:homeLocation>
  <schema:homeLocation>Baylies HillUxbridgeMassachusetts</schema:homeLocation>
  <schema:knowsAbout>Uxbridge AcademyBoston Young Ladies' Academy</schema:knowsAbout>
  <t:faith>Congregational</t:faith>
  <schema:homeLocation>NortonMassachusetts</schema:homeLocation>
  <schema:deathDate>1905</schema:deathDate>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_WCDH002">
  <foaf:givenName>Laban</foaf:givenName>
  <foaf:givenName>Morey</foaf:givenName>
  <foaf:familyName>Wheaton</foaf:familyName>
  <schema:additionalName>Husband</schema:additionalName>
  <schema:additionalName>Husb.</schema:additionalName>
  <rdfs:label>Laban Morey Wheaton Husband Husb.</rdfs:label>
  <schema:birthDate>1796-09-14</schema:birthDate>
  <schema:gender rdf:resource="https://schema.org/Male"/>
  <schema:knowsAbout>Brown University</schema:knowsAbout>
  <schema:knowsAbout>read law</schema:knowsAbout>
  <t:faith>Congregational</t:faith>
  <schema:hasOccupation>Postmaster</schema:hasOccupation>
  <schema:affiliation>Representative Massachusetts General Court</schema:affiliation>
  <schema:hasOccupation>Member Massachusetts Governor's Council</schema:hasOccupation>
  <schema:affiliation>TrusteeState Industrial School for Girls</schema:affiliation>
  <schema:deathDate>1865</schema:deathDate>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_WCDH699">
  <foaf:givenName>Samuel</foaf:givenName>
  <foaf:familyName>Wrigley</foaf:familyName>
  <rdfs:label>Samuel Wrigley</rdfs:label>
  <schema:gender rdf:resource="https://schema.org/Male"/>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_WCDH700">
  <foaf:givenName>Samuel</foaf:givenName>
  <foaf:familyName>Wrigley</foaf:familyName>
  <t:genName>Junior</t:genName>
  <rdfs:label>Samuel Wrigley Junior</rdfs:label>
  <schema:gender rdf:resource="https://schema.org/Male"/>
</bk:EconomicUnit>
<bk:EconomicUnit rdf:about="https://gams.uni-graz.at/context:depcha.example#pers_WCDH701">
  <t:roleName>Mrs.</t:roleName>
  <foaf:familyName>Wrigley</foaf:familyName>
  <rdfs:label>Mrs. Wrigley</rdfs:label>
  <schema:gender rdf:resource="https://schema.org/Male"/>
</bk:EconomicUnit>
<skos:ConceptScheme rdf:about="https://gams.uni-graz.at/context:depcha.example#Taxonomy">
  <skos:hasTopConcept rdf:resource="https://gams.uni-graz.at/context:depcha.example#c_rye"/>
</skos:ConceptScheme>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#c_rye">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:narrower rdf:resource="https://gams.uni-graz.at/context:depcha.example#c_springrye"/>
  <skos:prefLabel xml:lang="en">rye</skos:prefLabel>
  <rdfs:label>rye</rdfs:label>
  <skos:relatedMatch rdf:resource="https://www.wikidata.org/wiki/wd:Q12099"/>
</skos:Concept>
<skos:Concept rdf:about="https://gams.uni-graz.at/context:depcha.example#c_springrye">
  <skos:inScheme rdf:resource="https://gams.uni-graz.at/context:depcha.example"/>
  <skos:broader rdf:resource="https://gams.uni-graz.at/context:depcha.example#c_rye"/>
  <skos:prefLabel xml:lang="en">spring rye</skos:prefLabel>
  <rdfs:label>spring rye</rdfs:label>
</skos:Concept>
							
Code Snippet 42: The example of the Wheaton Day Book put into an RDF outfit

To begin with let us look into the information available in the <depcha:Dataset>: the arithmetic processes provide us with the result of 1 bk:Transaction, 2 bk:EconomicUnit entities, 1 bk:Money and 1 bk:EconomicGood. As we can see, also the bk:accountHolder was extracted correctly. Now, looking at the section about the bk:Transaction we will find the textual representation of the bk:entry and also the normalized date in the bk:when. Moreover, the RDF points onto the bk:Commodity and its classifcation that was retrieved from the <taxonomy> of the TEI. However, in the <bk:classified> element we are only confronted with the identifier. Next to other details the literal expression can then be found in the <skos:ConceptScheme>. We do also find information about the direction of this bk:Transfer: the bk:Commodity was transferred from #pers_WCDC002 to #pers_WCDH699. A resolution of those two identifiers can be found in the section after all the bk:Transaction entities in the <bk:EconomicUnit> entities where every bk:EconomicUnit contains details extracted from the <listPerson> as we added a bk:index to this element in the TEI. The second <bk:Transfer> consists of details about the bk:Money comprising all the data that was annotated in the TEI before. Still inside this <bk:Transaction> element we can also see that this bk:Transaction is settled and that it represents a bk:debit from the bk:accountHolder's perspective.

Linked Open Data

DEPCHA tries to offer its data in the LOD cloud. Therefore, you can add Wikidata concepts directly into the attributes or you can define your vocabulary in the TEI header in the form of a taxonomy. The following TEI snippet and the figure below should serve as examples.


							<body> 
   <head><name ana="bk:to" ref="#between.1">Stagville</name> August 1st 1808</head>  
   <table>  	
     <head>69 <name ana="bk:from" ref="#between.2">James Haley</name> J Self Dr.</head>  	
     <row ana="bk:entry">  		
       <cell>  			
         <measure ana="bk:commodity bk:from" commodity="wiki:Q11002" quantity="1" unit="wiki:Q100995"> 1 lb Sugar <measure ana="bk:price" quantity="2" unit="wiki:Q213142">2</measure> / <measure ana="bk:price" quantity="6" unit="wiki:Q234129">6</measure></measure>
       </cell>  
       <cell/> 
       <cell>
         <measure ana="bk:money bk:to" quantity="7" unit="wiki:Q213142">7</measure>
       </cell>  
       <cell>
         <measure ana="bk:money bk:to" quantity="6" unit="wiki:Q234129">6</measure>
       </cell> 
     </row>     
  </table>  
</body>
						
Code Snippet 43: Connecting DEPCHA data with the LOD cloud.

In this example the editor has defined his own concepts in the TEI header and links them to it.

CSV/Excel

Coming soon