<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Beverage Graph: Connecting Data about Consumable Liquids</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jessica Singer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Robert Warren</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Myra Analytics</institution>
          ,
          <addr-line>Ottawa, Ontario</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>We describe the design and ongoing update of a knowledge graph and its assorted ontologies which describe beverages and their commercial availability as products. Previous approaches have focused on beverage types or brands with limited support for tracing the product's content or identifying the specific product being consumed by a person. This inability to link the product and source has until now been a hindrance to nutritional studies and food traceability systems.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Beverage Ontologies</kwd>
        <kwd>Beverage Products</kwd>
        <kwd>Beer Products</kwd>
        <kwd>Juice</kwd>
        <kwd>Consumable Liquids</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>generic substance rather than an empirical measurement. The separate ontological structures
representing substances, containers, commercial products and their individual instances allow
the graph to be properly integrate with both empirically and statistically approximated
nutritional datasets. As most consumers interact with nutritional substances through products,
this ontological bridge will enable better end-user reporting of consumption which will lead to
better nutritional analysis and recommendation.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Design</title>
      <p>Knowledge Graph, vocabulary, schema, taxonomy and ontology are all terms that have come
to be used interchangeably in the literature, causing no small amount of confusion. Beverage
Graph is meant to be used as a RDFS/OWL ontologically-based Knowledge Graph capable of
integrating with as much of the food supply chain as possible. It currently numbers over 50M
triples, growing daily and available as a data dump at https://rdf.ag or through a Sparql endpoint
at https://rdf.ag/sparql. All Beverage Graph URIs are de-referenceable and accessible is most
data formats through HTTP Content Negotiation.</p>
      <p>
        The core of Beverage Graph relies heavily on the schema.org and GS1 vocabularies. Schema.org[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
is arguably one of the most successful RDFS web vocabularies currently in use. It provides
support for store inventory recording, commercial ofering and product variant enumeration.
While an oficial OWL version is available on experimental basis, we simply type the relevant
terms and properties as OWL entities.
      </p>
      <p>
        GS1 Global’s Webvoc[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is similarly available as an RDFS vocabulary that we augment using
OWL classes. The GS1 Webvoc has its roots in commercial logistics and product management,
providing support for the labeling of the product, branding and it’s identification for inventory
purposes. GS1 Webvoc also provides the gs1:packaging property and gs1:PackagingDetails class
which permits the creation of standardized package descriptions including their dimension
and weight. Currently, neither vocabulary provides a satisfactory solutions for “compound
packaging” for bundled containers. We resolve this issue by having intermediate packaging
listing parent item and count until such a time as a standardized solution be made available.
      </p>
      <p>The largest issue in aligning these two vocabularies was the resolution of what a product
is, as represented in Figure 1. We understand that Beer, Porter Beers and that a (hypothetical)
Porter Beer brewed by ACME exist as facts, but that pragmatically, ACME Porter Beer can only
really exist within a container.</p>
      <p>
        Furthermore, there is more than one size of container (variant) and each physical container is
iflled from beer from a specific lot (beer batch). The specific arrangement of Figure 1 leverages
the strengths of both schema.org and GS1 vocabularies to represent all aspects of a beverage
product. The actual contents of beverages is represented using the Beer[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and FoodOn[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
ontologies which gives the Beverage Graph coverage for Beers, Ciders, Meads, Juices and
“Flavored” Juice Drinks, with support for cofees, teas, wines and hard liquors to come at a later
date. Even in the case of untreated spring water, beverages are created through a process that
transforms ingredients into a product. The design of the Beverage Graph allows the use of
multiple ontologies to discover these processes. As an example, a query of the Porter class will
reveal linkages to the Hops[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] ontology which lists Golding hops as a common ingredient to the
Beer Ontology
rdfsb:eseurb:PColarstesrOf rdfs:subClassOf
      </p>
      <p>ACME Porter</p>
      <p>rdf:type
rdf:type
rdfs:subClassOf gs1:package
schema:isVariantrOdff:IAtnyCp4rMed7f3E:tmyPploCertaenr
rdfs:subClassOf</p>
      <p>ACME Porter in
473ml Can Lot 23
rdf:typredf:type
beer style. Similarly for fruit juices, we leverage the FoodOn ontology to ontologically reveal
ingredients, as in Figure 2.</p>
      <p>gs1:Beverage
schema:ProductGroup</p>
      <p>rdf:type
Dole® pineapple juice
7551c5ae-46c5-4d0f-a09dacc9dfffc8bb
rdfs:subC
lassO
f
pineapple juice
(unsweetened)
FOODON_03305240</p>
      <p>rom
deriRvOe_0d00F1000</p>
      <p>Monte Lirio
(Uninstanitated)</p>
      <p>owl:oneOf
pineapple plant</p>
      <p>NCBITaxon_4615</p>
      <p>The Dole®brand pineapple juice product group is a subclass of the FoodOn pineapple juice
class which references its source fruit. It is evident that the structure has enough flexibility
to reference the specific cultivar instead of a generic pineapple plant. Figures 1 and 2 are
simplifications of the data available within the graph and do not represent properties such as
packaging, manufacturer, brand and product description and location information.</p>
      <p>
        The beverage graph uses the W3C Provenance [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] ontology is to trace sources and beverage
processes, the OGC Time [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] ontology provides temporal annotations, the SKOS[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] vocabulary
used for descriptions and the OGC GeoSparql[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] vocabulary provides geolocation information.
We deliberately choose these mature, well engineered vocabularies over simpler solutions to
better support the complexity of the real world data being represented.
      </p>
      <p>
        Because several commercial sources are used to update the Beverage Graph, Entity resolution
is an important process due to the overlap between commercial data sources. The graph nature
of the data provides a ready made structure for a statistical record linkage[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] model to be build
and GeoSparql containment properties provides a quick means of obtaining coarse location
matching when combined with the GeoNames[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] RDF dataset. When any two entities are
determined to be the same, the SKOS-XL[
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] vocabulary is used to convert the most recent
entity node into a skos-xl:Label node which points to the authoritative entity. This approach
preserves the original data provenance and allows us to “walk back” erroneous merges if needed.
      </p>
      <p>We note with disappointment that vocabulary reuse seems to be a “do as I say and not as I
do” principle and that similar properties are often re-implemented. Concurrently, few graph
databases provide the facilities, or are configured, to make use of ontological equivalencies
when querying data. For this reason, the Beverage Graph often contains redundant properties in
order to make data consumption as simple as possible. A small series of ontological statements3
is also maintained here as a means of aligning temporal statements between PROV-O, Time
and schema.org as well as documenting equivalencies between common properties such as
gs1:organizationName, schema:name and foaf:name. The data can be consumed with or without
these ontological axioms.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Discussion</title>
      <p>The construction of the graph highlighted the complexities of commercial data management,
the benefits of ontological backing and the complexities of integrating diferent ontological
backed datasets. In acquiring external data, commercial API design reflect the needs and views
of their owners which can result in unexpected data representations. A product variant should
reference product instances that vary on explicitly defined, specific dimensions. Consumer
facing API will often return product variants based on undefined conditions which may include
similar packaging type, volume or store location which makes automated integration dificult.</p>
      <p>Issue in entity resolutions have highlighted the usefulness of generic terms such as the
Geonames 6295630 “planet earth” entity as a generic stand-in for the locality of a brewery
as this information is not always available. This avoids the sort of issues that would occur
in relational databases with null values, in that the data is always logically consistent and
schematically complete even through it is factually imprecise. Operationally, this greatly
reduces the complexity of entity resolution queries as fewer exceptions must be handled.</p>
      <p>
        Ontology quality literature focuses on ontological completeness, logical consistency and
structural issues[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] that are not always relevant to the actual operational use of the ontology
itself. Some ontologists view “enumerative completeness” as an (unrealistic) primary objective,
other rely on a reasoner reporting logical consistency and still others insist on over-constrained
ontological constructs. Again, from an end-user perspective design consistency is the most
important aspect through current tools and approaches may not enforce it. Our concern with
ontology reuse is poor high-level documentation and the lack of consistency (or curation) in the
ontological structures used across instances. FoodOn as an example is a collaborative project
curated by multiple people and one that has chosen to import non-ontological datasets in bulk.
Coordination across multiple designers can be dificult without close coordination and the large
amounts of imported terms can make it dificult to identify the curated parts of an ontology
and those still under review.
      </p>
      <p>3https://rdf.ag/o/BeverageGraph</p>
      <p>In this case, the consequence is that there are two mechanisms for defining a fruit juice
and some confusion as to whether it derives from the plant or the fruit. Both mechanisms
are ontologically consistent, but it makes querying the FoodOn ontology more dificult and
potentially duplicates terms. Much has been made of “the code being the documentation” but
at scale, ontological integration must be done programmatically and these issues will not be
discovered without a high level overview of how specific real world objects are modeled. Too
often, “suggestions” are made about the proper use of an ontology when it should be clearly
specified. While well intentioned, the cost of flexibility in solving too many problems is a series
of poor solutions instead of one good one.</p>
      <p>
        A parallel can be made with the early experiences of the Dublin Core standards which failed
to provide an oficial structure for citing a bibliographic work in RDF while simultaneously
publishing a dcterm:bibliographicCitation term. The only way known to the authors to use
Dublin Core coherently is the Bibo[
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] ontology which provides a minimal structure to dcterms
and which is being supplanted by the SPAR ontologies. To this end, we wish to highlight the
requirement for term labels, term descriptions and ontological object narratives that can explain
an ontology at a high-level. Too often, we read ontology documentation that focuses on itself
rather than on its uses and without commenting on the instantiation of classes or how to solve
actual problems within the domain.
      </p>
      <p>Lastly, the actual semantic power of OWL2 ontologies is immense which, in a parallel to
software design, can tempt designers to use overly complex technical solutions to simple
problems. Ontology end users that wish to solve their own problem will naturally gravitate to
the simplest, most documented solutions as it has the lowest cost of implementation.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Applications</title>
      <p>Beyond its initial focus on supporting beer brewers, the Beverage Graph is flexible in its design
to support additional information as to the product, the generic beverage and detailed packaging
information, including whether the packaging is recyclable and its composition.</p>
      <p>This opens the door to low hanging fruit studies on the prevalence of reusable packaging
versus recyclable packaging and their relative volumes within specific markets. As other datasets
also report the nutritional / calorimetric content of products, it becomes possible to quickly
generate a partial but accurate nutritional profile of a person’s diet simply by scanning the
barcode located on their beverage as they consume it. A direct application is in the resolution
of the product content on an ontological basis based on its nomenclature. Consider the case
of “Cider” which can mean an alcoholic beverage from fermenting apples or unfiltered apple
juice or (confusingly), an “Non-alcoholic Cider” sold in the context of alcoholic beverages that
contains no or only trace amounts of alcohol. As the Beverage graph reports the commercially
mandated alcohol by volume (beer:abvValue / gs1:percentageOfAlcoholByVolume) for beverages
an appropriate determination can be made.</p>
      <p>The addition of linkages to legislative ontologies may be most interesting from an analytical
viewpoint as legislation is heavily dependant on context and local culture. A direct example is
the contrast between beer, an alcoholic beverage, and vanilla extract, a baking ingredient. While
beer may contain alcohol, it is not mandated to and may actually be non-alcoholic. Vanilla
extract is mandated to contain a certain percentage of alcohol in order to be considered an
extract but is regulated as a food and not an alcoholic beverage. Legislatively, their intended use
dictates the regulatory regime under which they are controlled. From a public health perspective,
it is their compositional properties that will dictate their capacity to be abused.</p>
      <p>In closing, the Beverage Graph provides a core from which other datasets and ontology can
link against or extract a working set. It is freely available, well labeled and aims to be as open
as possible.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>The Beverage Graph is a maintained collection of instances and ontological classes that document
commercially available beverages, their contents and their packaging. It’s construction allows
for integrations with other external data sets and lends itself to dietary, commercial and food
production analysis. As additional upstream data sources are acquired, the graph will be
expanded to more brands and beverage types such as cofee, tea and hard liquors.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Heath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Idehen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Berners-Lee</surname>
          </string-name>
          ,
          <article-title>Linked data on the web (ldow2008)</article-title>
          ,
          <source>in: Proceedings of the 17th international conference on World Wide Web</source>
          ,
          <year>2008</year>
          , pp.
          <fpage>1265</fpage>
          -
          <lpage>1266</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R. V.</given-names>
            <surname>Guha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Brickley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Macbeth</surname>
          </string-name>
          , Schema.org:
          <article-title>Evolution of structured data on the web</article-title>
          ,
          <source>Commun. ACM</source>
          <volume>59</volume>
          (
          <year>2016</year>
          )
          <fpage>44</fpage>
          -
          <lpage>51</lpage>
          . doi:
          <volume>10</volume>
          .1145/2844544.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>GS1</given-names>
            <surname>Web Vocabulary Standard</surname>
          </string-name>
          ,
          <volume>1</volume>
          .6.1,
          <issue>GS1</issue>
          ,
          <year>2015</year>
          . URL: https://www.gs1.org/docs/ gs1-smartsearch/GS1_Vocabulary_Standard.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Warren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Singer</surname>
          </string-name>
          , Beer ontology,
          <year>2021</year>
          . URL: https://doi.org/10.5281/zenodo.4672337.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Dooley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. J.</given-names>
            <surname>Grifiths</surname>
          </string-name>
          , et al.,
          <article-title>Foodon: a harmonized food ontology to increase global food traceability, quality control and data integration, npj Science of Food 2 (</article-title>
          <year>2018</year>
          )
          <fpage>23</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Warren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Singer</surname>
          </string-name>
          , Hops ontology,
          <year>2021</year>
          . URL: https://doi.org/10.5281/zenodo.4672692.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <article-title>[7] Prov-o:</article-title>
          <source>The PROV Ontology</source>
          ,
          <year>2013</year>
          . URL: https://www.w3.org/TR/prov-o/.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Cox</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Little</surname>
          </string-name>
          , Time Ontology in
          <string-name>
            <surname>OWL</surname>
          </string-name>
          ,
          <year>2013</year>
          . URL: https://www.w3.org/TR/owl-time/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D.</given-names>
            <surname>Brickley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Miles</surname>
          </string-name>
          , SKOS Core Vocabulary Specification, W3C Working Draft,
          <year>W3C</year>
          ,
          <year>2005</year>
          . URL: http://www.w3.org/TR/swbp
          <article-title>-skos-core-spec/.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>OGC GeoSPARQL - A Geographic Query Language for RDF Data</surname>
          </string-name>
          ,
          <year>2012</year>
          . URL: http://www. opengis.net/doc/IS/geosparql/1.0.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>W. E.</given-names>
            <surname>Winkler</surname>
          </string-name>
          ,
          <article-title>Advanced methods for record linkage</article-title>
          ,
          <source>Technical Report rr945</source>
          , Statistical Research Division, U.S. Bureau of the Census,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Wick</surname>
          </string-name>
          , Geonames ontology,
          <year>2015</year>
          . URL: http://www.geonames.org/about.html.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Miles</surname>
          </string-name>
          , S. Bechhofer,
          <article-title>SKOS-XL Simple Knowledge Organization System eXtension for Labels</article-title>
          ,
          <source>Technical Report</source>
          ,
          <year>2009</year>
          . URL: https://www.w3.org/TR/skos-reference/skos-xl.html.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Gurk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Abela</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Debattista</surname>
          </string-name>
          ,
          <article-title>Towards ontology quality assessment</article-title>
          , in: MEPDaW/LDQ@ESWC,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>B. D'Arcus</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Giasson</surname>
          </string-name>
          , Bibliographic ontology specification,
          <year>2009</year>
          . URL: https:// bibliontology.com/specification.html.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>