<!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>The Lay of the Land: Data Visualizations of the Language Data and Domains of Wikidata ?</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Toronto, Faculty of Information</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Wikidata is a well-known collaborative knowledge graph containing multilingual data for hundreds of language locales, from Arabic (ar) to Zulu (zu). However, research on the state of language localization and the full extent of the topics that currently exist on Wikidata has been relatively limited. This paper presents data visualization in the form of various heatmaps resulting from machine learning experiments using BERT embeddings, t-SNE, and K-means clustering that show the kinds of topics, or domains, in Wikidata and the frequency of multilingual data across such domains. Such heatmaps are useful for identifying domains where language data is lacking and should be populated. A representative heatmap is also presented that shows the localization across domains for the top 30 languages geographically from west to east. Finally, future work in this space is also considered.</p>
      </abstract>
      <kwd-group>
        <kwd>Wikidata</kwd>
        <kwd>Multilingual data</kwd>
        <kwd>Domains</kwd>
        <kwd>Machine learning</kwd>
        <kwd>Data visualization</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Wikidata is a \free and open knowledge base that can be read and edited by
both humans and machines" that is actively researched and supports hundreds
of languages [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. For instance, the Wikidata item for the \Moon" is \Q405"2,
and is linked to labels, descriptions, and aliases in various languages. As KGs
like Wikidata are increasingly used in new products and AI services, it is worth
further looking into Wikidata's data coverage across international languages and
communities. At a high level, this paper presents developing work that seeks to
answer the following research question in order to o er a novel look into the
multilingual data on Wikidata. What is the distribution of multilingual data
across di erent languages and topics or domains in Wikidata, and how can such
distributions identify lack of coverage in multilingual data?
? Supported by funding from NSERC.
1 Copyright © 2021 for this paper by its authors. Use permitted under Creative
      </p>
      <p>Commons License Attribution 4.0 International (CC BY 4.0).</p>
    </sec>
    <sec id="sec-2">
      <title>2 https://www.wikidata.org/wiki/Q405</title>
      <p>To our knowledge, existing tools have not organized Wikidata into machine
learned subject matter topics, or domains, and visualized their distribution of
multilingual data. Other related tools and dashboards describe the multilingual
information on Wikidata, with a list of such tools available on Wikidata.3 For
instance, WDProp, is a dashboard that visualizes the frequency of translated label,
description, and alias values in the Wikidata ontology, but not other items.4
3</p>
      <sec id="sec-2-1">
        <title>Methodology</title>
        <p>The March 1, 2021 Wikidata JSON dump (&gt;80GB) was pro led using Python.</p>
        <p>Generating P31 object sets. The P31 property (\instance of") is a useful
way to determine the identity of Wikidata items as it accounts for 8.07% of all
statements in Wikidata and 96.48% of items have at least one P31 statement. P31
object sets, where s 2 S, were generated. Based on triples in a (Qid; P 31; object)
format, where the item's \Qid" is the subject and the object is also another item,
a P31 object set is a set of the Qid(s) in the object positions for all P31 triples
(e.g. [(Q13442814) scholarly article, (Q7318358) review article]). As
the distribution of sets has a long tail, a threshold of at least one thousand items
was used which resulted in a jSj of 1588 sets that account for 97.15% of all items.</p>
        <p>
          For one experiment, the composition of the P31 object sets were converted
into 1-hot encoded vectors as follows. For each set, sn, which can be composed
of multiple Wikidata items q1; q2; :::; qn, a feature vector, fq is created of length
jSj where the value of fqi is one if the set contains the Wikidata item qn and
zero otherwise. In another approach, the English labels and descriptions were
collected for each of the items qn in a set sn and put into a vector for natural
language processing (NLP). These NLP features were encoded into 768-dimensional
sentence embeddings by Sentence-BERT models [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. After experimentation, the
stsb-roberta-large model was chosen due to its optimization for Semantic
Textual Similarity (STS) comparison.
        </p>
        <p>Hyperparameter tuning of t-SNE and K-means. The t-Distributed
Stochastic Neighbor Embedding (t-SNE) technique was used to reduce the data
to two dimensions, followed by K-means clustering. In order to achieve optimal
clustering, hyperparameter tuning of t-SNE perplexity, learning rate, and number
of iterations and K-means number of clusters using grid search was used to
obtain the highest silhouette scores. Using 1-hot encoded vectors, perplexity of
2, learning rate of 150, number of iterations of 15,000, and k = 65 clusters
produced the highest silhouette score of 0.868. Using BERT embeddings, the
optimal parameters of perplexity of 2, learning rate of 300, number of iterations
of 2500, and k = 375 clusters resulted in silhouette score of 0.714.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 https://www.wikidata.org/wiki/Wikidata:Tools/Visualize_data</title>
    </sec>
    <sec id="sec-4">
      <title>4 https://wdprop.toolforge.org/wdprop.html</title>
      <p>
        An interactive web application tool was created to visualize the results of the
optimal hyperparameters and other experimental attempts using the interactive
Python library bokeh, GitHub, and Heroku.5
Domains of Wikidata. Wikidata's ontology does not explicitly assign classes
of entities into speci c subject matter \domains" as was the case for Freebase
with such domains as \awards" and \zoos" [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. For external validation of the
learned clusters, ground truth labels were created by iteratively generating
category labels by the authors using a grounded theory approach to qualitatively
code each P31 object set based on its English labels, descriptions, aliases and
other relevant information. The initial seed of subject matters was inspired by
examining word clouds of the clusters and nding overarching themes. To
address the subjective nature of these assignments, new domains were created for
generally di erent and orthogonal subjects.
      </p>
      <p>The distribution of the di erent domains in the ground truth labeled data
is shown in Figure 2. Many of the domains found in the P31 object sets
concern administrative districts (e.g. (Q18524218) canton of France), space or
astronomy (e.g. (Q2488) spiral galaxy), public facilities or transportation
(e.g. (Q28564) public library, (Q2175765) tram stop), and geography (e.g.
(Q4022) river).</p>
      <p>To check the external validity of the clusters with the ground truth labels tj 2
T , the purity measure was used. P urity = N1 Pik=1 maxjjci \ tjj, is calculated</p>
    </sec>
    <sec id="sec-5">
      <title>5 https://wd-bokeh.herokuapp.com/</title>
      <p>by assigning each cluster to the class which is most frequent in the cluster ci and
measuring the accuracy of this assignment by counting the number of correct
assignments and dividing by N . A purity metric of 0.799 was achieved for the
BERT embedding clusters, compared to 0.352 for 1-hot encoded vectors. These
metrics indicate that the BERT-based sentence embeddings were able to learn
more internally consistent clusters.</p>
      <p>Heatmaps of multilingual data across domains. Heatmaps were
generated using the Python library seaborn to depict the prevalence of localized
language data across the various domains of Wikidata. The heatmaps may be
adjusted to show counts (best viewed on a log-scale due to large value ranges),
and percents of total localized in order to identify areas where Wikidata labels,
aliases, and descriptions are lacking and open to focused data augmentation and
localization e orts. These various heatmaps are accessible at the aforementioned
web application tool.6 A representative example of these heatmaps is shown in
Figure 3, where the top 30 languages by the number of global speakers according
to Ethnologue7 are arranged from left to right to correspond with west to east
geographically.
5</p>
      <sec id="sec-5-1">
        <title>Future Work</title>
        <p>Future work that builds on these ndings will utilize the generated heatmaps
to determine areas of missing multilingual data in Wikidata. Instead of general
statistics on the prevalence of the most or least populated languages, by
using the heatmaps speci c parts of Wikidata can be identi ed for targeted data
augmentation and enrichment of labels, aliases, and descriptions. For instance,
knowledge graph embeddings and link prediction may be directed at the most
interesting portions of Wikidata that may be identi ed.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6 https://wd-bokeh.herokuapp.com/</title>
    </sec>
    <sec id="sec-7">
      <title>7 https://www.ethnologue.com/guides/ethnologue200</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bollacker</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Evans</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paritosh</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sturge</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , J.:
          <article-title>Freebase: a collaboratively created graph database for structuring human knowledge</article-title>
          .
          <source>In: Proceedings of the 2008 ACM SIGMOD international conference on Management of data</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Reimers</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gurevych</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Sentence-bert: Sentence embeddings using siamese bertnetworks</article-title>
          .
          <source>In: Proceedings of the 2019 Conference on EMNLP (11</source>
          <year>2019</year>
          ), http: //arxiv.org/abs/
          <year>1908</year>
          .10084
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Vrandecic</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Krotzsch, M.:
          <article-title>Wikidata: a free collaborative knowledgebase</article-title>
          .
          <source>Communications of the ACM</source>
          <volume>57</volume>
          (
          <issue>10</issue>
          ),
          <volume>78</volume>
          {85 (Sep
          <year>2014</year>
          ). https://doi.org/10.1145/2629489, http://dl.acm.org/citation.cfm?doid=
          <volume>2661061</volume>
          .
          <fpage>2629489</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>