We would like to thank all the researchers who engaged in the discussion to develop the markup model, both at the 2017 Annual Meeting of the TEI Consortium and on the TEI Consortium GitHub site, especially Elisa Beshero-Bondar, Dario Kampkaspar, Duncan Paterson, Laurent Romary, and James Cummings. Kathryn Tomasek deserves the greatest acknowledgment for her encouragement and for inviting us to join the research project MEDEA (Modeling semantically Enriched Digital Edition of Accounts).
The project reported in this paper is funded by the National Institute of Japanese Literature and the National Museum of Japanese History, and supported by the Japan Society for the Promotion of Science Grant-in-Aid for Scientific Research (S), “Construction of a New Knowledge Base for Buddhist Studies: Presentation of an Advanced Model for the Next Generation of Humanities Research,” represented by Professor Masahiro Shimoda at the University of Tokyo.
1This paper presents a markup model for encoding units and measurements which are not based on the International System of Units (SI). The TEI P5 Guidelines recommend the use of the <measure> element, which requires a single @unit and @quantity (TEI Consortium 2018, “<measure>”)1 for marking up the units used for measurement. But the main issue we address in this paper is that some historical units and measurements cannot be encoded in a single <measure> element because they are compounds containing a set of variable units and numerical components. A typical example of the compound unit would be a British imperial length measurement, such as 3 yds 2 ft 11 in (3 yards, 2 feet, and 11 inches). The same issue arises with the Japanese historical measurements, as we can see from examples in the Engi-Shiki, which was compiled as an administrative manual in ancient Japan around the tenth century CE (Bock 1970). Figure 1 provides an example of the compound units used to measure the weight of copper. In this text, there are variable units, namely 斤 kin, 両 ryō, 分 bu, and 銖 shu. They were not based on the decimal system, since 1 斤 kin was equal to 16 両 ryō, 1 両 ryō was 4 分 bu, and 1 分 was 6 銖 shu. In this example, “銅二千五百十六斤十両二分四銖 (Copper 2516 kin 10 ryō 2 bu 4 shu)” shows a specific weight expressed using these four different units.
Figure 1. Sample description of a compound measurement for copper in the Engi-Shiki.
National Museum of Japanese History.
2In order to encode such compound units, we propose three new elements and one new attribute: <unitDecl> (model.encodingDescPart), <unitDef> (model.global and contained by <unitDecl>), <unity> (model.measureLike), and a relevant attribute @factor (which shows factors of numerical values given in a referenced <unit> element), so that we can clarify the relations among the units in the <teiHeader>. All of these will be included in the TEI P5 Guidelines in due course, and the ODD File for them will be described in detail later in this paper.
3Although this paper provides a markup model based on a Japanese historical source, this model also enables us to encode idiosyncratic systems of measurement within various cultural spheres other than Japan. This set of tags is useful for encoding units that are not based on the decimal system or whose unit conversion system changed over time. For instance, conversion relations among the English coal measures keel, chalder, and bushel had changed between the fifteenth century and the implementation of the Imperial Weights and Measures Act of 1824 (figure 2).
Figure 2. Pre-Imperial English coal measures (Zupko 1977, 144, 151).
The sample encoding of these units will be provided in section 4.2. below.
4Since texts related to measurement indicate such regional and chronological differences, it is necessary to mark up the original historical figures as precisely as possible. The new markup model enables us to express the complex and changing semantics of the units and measurements.
5In this section, we describe the outline of our project—marking up the texts of the Engi-Shiki—and compare it with other related projects and previous studies.
6Delmer Brown, an American scholar of the Engi-Shiki, describes it as “a 50-volume work compiled between … 907 and 927 [CE]. The first 10 volumes are Imperial Shinto regulations (jingi 神祇) and the last 40 are codifications of criminal (ritsu 律) and administrative (ryō 令) law” (UC Berkeley 2010). According to one of the most influential researchers on ancient Japanese history, Toshiya Torao, the Engi-Shiki contains a wide range of detailed regulations on society and administration during the period from the Nara to the Heian era (eighth to thirteenth centuries). For instance, the text lists rituals and festivals held in various parts of Japan, the designation of offerings made at rituals, tributes and taxes paid to the Ritsuryō government, and allocation of Shōzei and Kugai (rice plants used as a kind of fund which were distributed to each administrative county). To put it simply, by consulting the Engi-Shiki, we can grasp various aspects of both state administration and daily life in ancient Japan (Torao 1995).
7But there is a historiographical problem. Because so many elements of interest are described in such rich detail, previous research based on the Engi-Shiki has tended to be subdivided into very specialized and partial studies. For example, Sakamoto (1979–1980) comprehensively lists the products of each administrative county; Fukushima (1971) and Ōsumi (1996) focus on the aquatic products; Satō (2012) examines the dairy products; papers and paper manufacturing are the focal point of Ōkawa and Masuda (1981); and Miyahara (2014) traces the records related to abalone, which was the most circulated food at that time. This subdivision and specialization makes it difficult to verify quantitative analyses, because there is no text database in which researchers could search for numerical values attached to specific products and items.
- 2 We have been greatly inspired by the projects of the MEDEA Workshop, which deal with the markup mod (...)
8Our research project has been working to provide a possible solution to this problem. One of our aims is to formulate a text database enabling historians, according to their individual interests, to extract numerical values by making use of various machine-processable data on society and administration in ancient Japan. One similar research project, the Japanese Historical Text Initiative (JHTI), based at the Center for Japanese Studies at the University of California, Berkeley, offers digitized text of the first ten volumes of the Engi-Shiki text in Japanese and in English translation along with page images of the manuscript volumes (UC Berkeley 2010). Our project will provide TEI-based text and numerical values attached to the various kinds of products and items, comprehensively covering all fifty volumes of the Engi-Shiki. For this purpose, we have proposed expanding the functionality of the <measure> element (Kokaze and Nagasaki 2016).2
9We have based our project on the 土御門 Tsuchimikado version of the Engi-Shiki (Kokuritsu Rekishi Minzoku Hakubutsukan Kanzō Shiryō Henshūkai 2000–).
Figure 3. Sample passages from the Engi-Shiki, from volume 1 四時祭式 Shijisai-Shiki.
National Museum of Japanese History.
10The basic structure of the Engi-Shiki has a simple hierarchy which goes down from 式 shiki to 条 jou. So, we mark up the sample passage of the Engi-Shiki, shown in figure 3, using nested <div> elements, as follows:
Example 1. Basic structure of the Engi-Shiki encoding.
<body>
<div ana="四時祭上" n="1" type="式" subtype="条">
<head type="式名">四時祭上</head>
<div type="条" n="1.1">
<head type="条名">祭祀大中小</head>
<p>凡践祚大嘗祭為大祀、祈年・月次・神嘗・新嘗・賀茂等祭為中祀、大忌・風神・鎮花・三枝・相嘗・鎮魂・鎮火・道饗・薗・韓神・松尾・平野・春日・大原野等祭為小祀、〈風神祭已上、並諸司斎之、鎮花祭已下、祭官斎之、但小祀祭官斎者、内裏不斎、其遣勅使之祭者斎之、〉</p>
</div>
<div type="条" n="1.2">
<head type="条名">祭日</head>
<p>凡祈年祭二月四日、大忌・風神祭並四月・七月四日、月次祭六月・十二月十一日、神嘗祭九月十一日、 其子・午・卯・酉等日祭、各載本条、自余祭不定日者、臨時択日祭之、二月祭</p>
</div>
<!-- the rest of the contents -->
</div>
</body>
Table 1. Descriptions of the basic structural markup.
Element |
@type |
Description |
div |
式 |
Nests a <head> element and several <div> elements; @ana and @n provide the name and the index number of the 式; @subtype="条" makes the hierarchical relation between 式 & 条 clear |
head |
式名 |
Includes the 式 Shiki’s Name |
div |
条 |
Nests a <head> element and a <p> element; @n gives the index number of the 条 within the 式, using “.” as the delimiter (e.g., n="1.2") |
head |
条名 |
Includes the 条 Jou’s Name |
p |
|
Contains the main text of each 条 Jou |
11Marking up the basic structure of the Engi-Shiki in this way allows an overview of the tree structure of the source, using the Oxygen XML Editor’s “Grid” mode, for example.
12Having outlined the basic document structure of the Engi-Shiki, we can return to the encoding of the definitions of non-SI units. Needless to say, TEI provides tags for taxonomies and classification (TEI Consortium 2018, “<classDecl>”).3 If you want to categorize and define non-SI units, you can express them by the descendent elements of <encodingDesc>, as follows:
Example 2. A taxonomy of non-SI units.
<encodingDesc>
<classDecl>
<taxonomy>
<bibl>units of measuring weight</bibl>
<category xml:id="斤">
<catDesc>斤is a unit measuring weight and equal to 16両.</catDesc>
</category>
<category xml:id="両">
<catDesc>両is a unit measuring weight and equal to 4分.</catDesc>
</category>
<category xml:id="分">
<catDesc>分is a unit measuring weight and equal to 6銖.</catDesc>
</category>
<category xml:id="銖">
<catDesc>銖is a unit measuring weight.</catDesc>
</category>
</taxonomy>
</classDecl>
</encodingDesc>
13In this way, relations among non-SI units of measurement might be described in a human-readable way, within the <catDesc> element. However, it is difficult to express the unit conversion system among the measurements in a machine-readable way, especially when those units are not based on the decimal system.
14Instead of defining the unit conversion system in the <teiHeader>, we could encode the compound measurements in the form of inline markup, as Cummings and Wilcox (2013, sec. 7) show in this example of encoding a value in old English money:4
Example 3. Old English money, as encoded by Cummings and Wilcox (2013).
<seg type="fee" rend="roman-numerals aligned-right">
<num type="totalPence" value="1240">
<!--orig: vli iijs iiijd -->
<num type="poundsAsPence" value="1200">v<hi rend="superscript">li</hi></num>
<num type="shillingsAsPence" value="36">iij<hi rend="superscript">s</hi></num>
<num type="pence" value="4">iiij<hi rend="superscript">d</hi></num>
</num>
</seg>
15One of the important points of their markup is the use of nested <num> elements with @type attributes, indicating “vli iijs iiijd” as a compound unit, not as separated units. Although this example is inspiring for our project, we would prefer not to store converted numerical values in @value attributes; we would rather keep the original data when it comes to inline markup. The reason for this is that the unit conversion system has altered over time, as in the case of the British coal measures shown in figure 2.
16In order to structure, in the <teiHeader>, a wide variety of measurement semantics within each of the historical documents, we propose a new set of elements and attributes. To take an example from the Engi-Shiki, the following is a definition of 斤, 両, 分, and 銖, all of which are units for measuring weight. For the sake of readability, we omit the compulsory <fileDesc> element. Customized elements and attributes are <unitDecl>, <unitDef>, <unit>, and @factor.
Example 4. Proposed usage of <unitDecl>.
<encodingDesc>
<unitDecl>
<unitDef xml:id="斤" type="weight">
<label xml:lang="ja">斤</label>
<label xml:lang="ja-Latn">kin</label>
<unit ref="#両" factor="16"/>
<desc xml:lang="en">斤is a unit measuring weight and equivalent to 16両.</desc>
</unitDef>
<unitDef xml:id="両" type="weight">
<label xml:lang="ja">両</label>
<label xml:lang="ja-Latn">ryō</label>
<unit ref="#分" factor="4"/>
<desc xml:lang="en">両is a unit measuring weight and equivalent to 4分.</desc>
</unitDef>
<unitDef xml:id="分" type="weight">
<label xml:lang="ja">分</label>
<label xml:lang="ja-Latn">bu</label>
<unit ref="#銖" factor="6"/>
<desc xml:lang="en">分is a unit measuring weight and equivalent to 6銖.</desc>
</unitDef>
<unitDef xml:id="銖" type="weight">
<label xml:lang="ja">銖</label>
<label xml:lang="ja-Latn">shu</label>
<desc xml:lang="en">銖is a unit measuring weight.</desc>
</unitDef>
</unitDecl>
</encodingDesc>
17Here, the <encodingDesc> contains a <unitDecl> element that declares information about the measurement semantics in that source, and nests <unitDef> as the compulsory child. In this <unitDef> element, we can define the identifier and the purpose of a unit by using @xml:id and @type attributes respectively. The <label> and <desc> elements contained by the <unitDef> can be used to describe how a unit of measurement is used in the source and give some information about that unit. Inside the <unitDef> we find the <unit> element, which was originally suggested by Laurent Romary on the TEI Consortium GitHub repository.5 Though we have benefited from his contribution in developing our markup model, his approach deals mainly with examples of in-line markup within the <body> element. However, the proposed <unit> element can reasonably be used in the <teiHeader> to indicate the relationship of the conversion between units, along with @factor, which shows the numerical formula. Together, these elements enable us to mark up units that, in their original forms surviving in the historical financial records, are not based on decimal notation.
- 6 The ODD file and encoding examples are current at the time of writing, and are under consideration (...)
18We propose the following TEI ODD specifications6 for marking up units:
Example 5. Proposed ODD specification for marking up units.
<elementSpec ident="unit" ns="http://www.example.org/ns/nonTEI" mode="add">
<desc>contains a symbol, a word or a phrase referring to a unit of measurement in any kind of formal or informal system.</desc>
<classes>
<memberOf key="model.measureLike"/>
<memberOf key="att.canonical"/>
<memberOf key="att.global"/>
<memberOf key="att.typed"/>
</classes>
<content>
<macroRef key="macro.paraContent"/>
</content>
<attList>
<attDef ident="factor" mode="add">
<desc>shows factors of numerical values given in a referenced <gi>unit</gi> element</desc>
<datatype>
<dataRef key="teidata.numeric"/>
</datatype>
</attDef>
</attList>
</elementSpec>
<elementSpec ident="unitDef" ns="http://www.example.org/ns/nonTEI" mode="add">
<desc>contains descriptive information related to certain unit.</desc>
<classes>
<memberOf key="model.global"/>
<memberOf key="att.global"/>
<memberOf key="att.datable"/>
<memberOf key="att.canonical"/>
<memberOf key="att.typed"/>
</classes>
<content>
<alternate maxOccurs="unbounded">
<elementRef key="unit" minOccurs="1"/>
<classRef key="model.labelLike"/>
</alternate>
</content>
</elementSpec>
<elementSpec ident="unitDecl" ns="http://www.example.org/ns/nonTEI" mode="add">
<desc> (unit declarations) provides information about non-SI (the International System of Units) units and measurement.</desc>
<classes>
<memberOf key="model.encodingDescPart"/>
<memberOf key="att.global"/></classes>
<content>
<elementRef key="unitDef" minOccurs="1" maxOccurs="unbounded"/>
</content>
</elementSpec>
19Among these definitions in this ODD File, we need to explain why we choose att.datable in the <unitDef> element. In order to illustrate the reason for this choice, we provide a sample encoding of the conversional transition within the English coal measures mentioned in section 1.2 above:
Example 6. Encoding of the conversions relating to English coal measures.
<encodingDesc>
<unitDecl>
<unitDef xml:id="keel_prev" type="coal_measure" from="1421" to="1676">
<label xml:lang="en">keel</label>
<unit ref="#chalder_prev" factor="20"/>
<desc>In England, keel was a unit for measuring coal and equal to 20 chalders from 1421– 1676.</desc>
</unitDef>
<unitDef xml:id="chalder_prev" type="currency">
<label xml:lang="en">chalder</label>
<unit ref="#bushel_prev" factor="32" from="1421" to="1676"/>
<unit ref="#bushel_new" factor="36" from="1676" to="1824"/>
<desc>In England, chalder was a unit for measuring coal and equal to 32 bushels from 1421–1676 and equivalent to 36 bushels from 1676–1824.</desc>
</unitDef>
<unitDef xml:id="bushel_prev" type="currency">
<label xml:lang="en">bushel</label>
<desc>In England, bushel was a unit for measuring coal.</desc>
</unitDef>
<unitDef xml:id="keel_new" type="coal_measure" from="1676" to="1824">
<label xml:lang="en">keel</label>
<unit ref="#chalder_new" factor="12"/>
<desc>In England, keel was a unit for measuring coal and equivalent to 12 chalders from 1676–1824.</desc>
</unitDef>
<unitDef xml:id="chalder_new" type="currency">
<label xml:lang="en">chalder</label>
<unit ref="#bushel_new" factor="36" from="1676" to="1824"/>
<desc>In England, chalder was a unit for measuring coal and equivalent to 36 bushels from 1676–1824.</desc>
</unitDef>
<unitDef xml:id="bushel_new" type="currency">
<label xml:lang="en">bushel</label>
<desc>In England, bushel was a unit for measuring coal, whose conversion formula was changed chronologically.</desc>
</unitDef>
</unitDecl>
</encodingDesc>
20Finally, we present two markup examples of a passage in the Engi-Shiki. First we encode the passage based on the current TEI P5 Guidelines, using the <measure> element and the @unit attribute, and then we demonstrate an example using <unit> elements within the <body> texts. These two examples do not necessarily differ from each other except in encoding, but both refer to the @xml:id attribute defined in the <unitDef>.
21The text shown below is a part of the section describing regulation of taxes imposed upon the two administrative counties, 備中 Bicchū and 長門 Nagato. In this case, the taxes were paid annually to the contemporary Ritsuryō government in copper 銅 and lead 鉛 mineral resources.
Example 7. Current scheme, <measure> with @unit attribute.
<div ana="主税上" n="26.95" type="条">
<head type="条名">鋳銭年料</head>
<p>
凡鋳銭年料銅鉛者、<placeName xml:id="備中国">備中国</placeName>
<measure commodity="銅" xml:id="備中_主税_銅" quantity="800" unit="#斤">
銅八百斤</measure>、
<placeName xml:id="長門国">長門国</placeName>
<measure commodity="銅" xml:id="長門_主税_銅" type="whole">銅
<measure quantity="2516" unit="#斤" type="each">二千五百十六斤</measure>
<measure quantity="10" unit="#両" type="each">十両</measure>
<measure quantity="2" unit="#分" type="each">二分</measure>
<measure quantity="4" unit="#銖" type="each">四銖</measure>
</measure>、
<measure commodity="鉛" xml:id="長門_主税_鉛" type="whole">鉛
<measure quantity="1516" unit="#斤" type="each">千五百十六斤</measure>
<measure quantity="10" unit="#両" type="each">十両</measure>
<measure quantity="2" unit="#分" type="each">二分</measure>
<measure quantity="4" unit="#銖" type="each">四銖</measure>
</measure>、
</p>
</div>
22There are some points worth mentioning in this markup example. In the <div> element, we provide metadata about the passage, using the relevant default TEI attributes. These attributes explain that the text contained by the <div> element is the 95th passage of the 26th volume of the Engi-Shiki, 主税上 Shuzei-no-Jō. 鋳銭年料 Chūsen Nenryō, the passage title, means the annual tax in the form of minted currency. Three <measure> elements that have the @commodity attribute contain one or more variable units and numerical components. In the second and third examples, we describe the relationship of the compound measurement, using @type="whole" and @type="each", inspired by Cummings and Wilcox (2013). Note that in this markup example we avoid using <measureGrp> elements as parent elements of <measure type="each"/> elements, because the TEI P5 Guidelines recommend using <measureGrp> when marking up a group of dimensional specifications (TEI Consortium 2018, “<measureGrp>”).7
23Or, to mark up each of the units separately, <unit> elements can be used in the inline markup, as follows:
Example 8. Using <unit> element.
<div ana="主税上" n="26.95" type="条">
<head ana="鋳銭年料"/>
<p>
凡鋳銭年料銅鉛者、<placeName xml:id="備中国">備中国</placeName>
<measure commodity="銅" xml:id="備中_主税_銅">銅
<num value="800">八百</num><unit ref="#斤">斤</unit></measure>、
<placeName xml:id="長門国">長門国</placeName>
<measure commodity="銅" xml:id="長門_主税_銅" type="whole">銅
<measure type="each">
<num value="2516">二千五百十六</num><unit ref="#斤">斤</unit></measure>
<measure type="each">
<num value="10">十</num><unit ref="#両">両</unit></measure>
<measure type="each">
<num value="2">二</num><unit ref="#分">分</unit></measure>
<measure type="each">
<num value="4">四</num><unit ref="#銖">銖</unit></measure></measure>、
<measure commodity="鉛" xml:id="長門_主税_鉛" type="whole">鉛
<measure type="each">
<num value="1516">千五百十六</num><unit ref="#斤">斤</unit></measure>
<measure type="each">
<num value="10">十</num><unit ref="#両">両</unit></measure>
<measure type="each">
<num value="2">二</num><unit ref="#分">分</unit></measure>
<measure type="each">
<num value="4">四</num><unit ref="#銖">銖</unit></measure></measure>
</p>
</div>
24In this example, three <measure> elements that have the @commodity attribute contain one or more <num> and <unit> elements as sibling elements. Each <measure> element shows a specific weight of the mineral resource as a whole, using @type="whole". We store actual values in the @value attribute in the <num> elements in the form of Arabic figures so that we can easily extract them using XSLT or other programming languages.
25This paper proposes a markup model and gives examples for encoding non-SI units and measurements, based on our work with the Engi-Shiki. Historically, there have been many examples of compound measurement which require sets of various units and numerical components, so we have to consider how to encode them. Of course, the TEI P5 Guidelines offer us possible solutions, such as defining the taxonomies of measurement in the <classDecl> and providing nested <num> or <measure> elements in the form of inline markup. But the major limitation of those solutions is that they are not amenable to machine processing based on the unit conversion system.
26Among the components of our proposal, @factor and attributes from the att.datable class (e.g., @from, @to) within the <unitDef> element are the most effective for the purpose of describing the measurement semantics. As the example of the English coal measures keel, chalder, and bushel shows, the unit conversion formula is subject to change over time even within the same country. Therefore, it would be a reasonable practice when encoding non-SI units and measurements to describe the unit conversion formula with @factor between variable units, capturing the dating context with @from and @to in the <unitDef>.
27We note in closing that our interest in encoding units of measurement is shared by other members of the TEI consortium and we look forward to further discussion.
SVN keywords: $Id: jtei-kokaze-177-source.xml 826 2019-09-06 00:55:53Z ron $