<!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>KnKonwo wleldedggeeGGrraapphh ooffPprersesssClciplippipnignsgRserfeerfreirnrging sSoocciiaall Mmiinnoorritiiteise*s</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>ulo M</string-name>
          <email>paulo.jorge.pm@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>rtins</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>ro Cost</string-name>
          <email>leandro.costa16@hotmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>rlos R</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics, University of Minho</institution>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Introduction - Major Minors</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Minho</institution>
          ,
          <country country="PT">Portugal</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Major Minors is a project that collects press clippings from Portuguese newspapers (currently from 1996 until 2019) which refer subjects related with minorities. Its datasource is the Arquivo.pt (repository of the past Portuguese World Wide Web). This data was used to generate ontologies (RDF triplestores composing a semantic database) and interfaces to interact with them (SPARQL APIs following W3C standards for Semantic Web). We enriched this basis with new ramifications, by identifying and crossing references with 19 entities. This paper describes the methodologies implemented to develop this Knowledge Graph.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontology</kwd>
        <kwd>Knowledge Graph</kwd>
        <kwd>RDF</kwd>
        <kwd>OWL</kwd>
        <kwd>Minorities</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>recommended by W3C for the Semantic Web, mainly RDF (Resource
Description Framework), OWL (Ontology Web Language), Turtle (Terse RDF Triple
Language) and SPARQL (Sparql Protocol and RDF Query Language).</p>
      <p>
        Ontologies, the backbone of the Web 3.0, which contain the vocabulary,
semantic relationships, and simple rules of inference and logic for a specific
domain, are accessed by software agents. These agents locate and combine data
from many sources to deliver meaningful information to the user[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>This project explores this principle, trying to contribute to the Semantic Web
initiative, by building a web of relational semantic data related to a domain
(Web 3.0), instead of a traditional web of documents (Web 2.0). Our subject
of study is the media representation of minorities in Portuguese newspapers,
mainly the ”Pu´blico”, because it is the oldest daily newspaper archived in the
”Arquivo.pt”, with the largest number of articles available. At the moment, this
project archived ⇠ 49.000 articles, in ontological graphs, between 1996 and 2019.
These ontologies were augmented into a Knowledge Graph, by extracting and
building relationships with real-world entities mentioned in the texts.</p>
      <p>For this study, 8 minority groups were focused: refugees, women, Africans,
Asians, homosexuals, migrants, gypsies and animals. By ”minorities” we refer to
macro social groups with some kind of social stigma and/or struggle for
equality/rights. The chosen categorization reflect the research fields of the
partnerships established with other research groups (CEHUM, NetLang, etc.).</p>
      <p>This project was born in he Department of Informatics of the University
of Minho, but we underline the multidisciplinar collaborations later established
with other Research Centers, namely humanities research groups (e.g. CEHUM):
the chosen categorizations reflect the fields of study of these collaborations
partnered with the project (the most recent one is the NetLang R&amp;D project).
Research is undergoing and new minorities and thematics could be integrated in
the future, accordingly to new partnerships.</p>
      <p>
        This paper objective is to focus the methodologies developed for the
Knowledge Graph implementation. In a past paper[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] we covered an overall overview of
the project, for that reason and space limitations, we will be succinct and avoid
other subjects. On section 2 we’ll briefly summarize an overview of the main
development stages for contextualization. On section 3 we’ll cover the
methodologies related with the ontology. Finally, section 4 will summarize these results.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Project Overview</title>
      <p>From this project resulted a website with di↵erent services, two ontologies
(ontology a) all the newspaper corpus; ontology b) only the corpus referring
minorities), public APIs (SPARQL based) and Reactive Interfaces to mediate data
exploration. Namely, these are some of the main endpoints/URLs:
– Major Minors website: http://minors.ilch.uminho.pt
– RDF Triplestore (GraphDB): http://sparql.ilch.uminho.pt
– Open-source tools (GitHub): https://github.com/Paulo-Jorge-PM</p>
      <p>This project development cycle is summarized on Figure 1.</p>
      <p>The initial stages extracted and segregated data from the raw newspaper
articles, prioritizing them accordingly to the identification of semantic trees of
keywords related with specific minorities, and their position/relevance inside
the texts of each article. For that we built an algorithm in which di↵erent scores
were attributed to di↵erent types of keywords and positions (e.g. if mentioned
on the title, body, description, tags, etc.), allowing us to order the articles,
comments and photos by their relevance relative to each identified minority
(Figure 2 exemplifies this prioritization algorithm). The objective of these initial
processes was to identify articles mentioning subjects associated with di↵erent
minorities, ordering by its relevance, and to extract structured metadata.</p>
      <p>The last and central stages of development focused the generation of
ontologies with these metadata, and the augmentation of the graph three with new
ramifications by identifying, inside each article, references to external entities
(Public Figures, Political Parties, Cities, etc.), building a Knowledge Graph with
contextual relationships. Di↵erent interfaces and APIs were built around these
data, in order to make them publicly accessible and easy to navigate (Figure 3).
3</p>
    </sec>
    <sec id="sec-3">
      <title>From Ontologies to a Knowledge Graph</title>
      <p>The central stages of this project focused the development of ontologies, tools
for automatically feeding them into a Knowledge Graph, and interfaces for data
availability. Figure 3 summarizes this approach.</p>
      <p>
        An ontology is a ”specification of a conceptualization”, ”a description (like
a formal specification of a program) of the concepts and relationships that can
exist for an agent or a community of agents”[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Essentially, in a broad sense, it is
a type of graph database based on triplestores for each fact (Subject, Predicate,
Object), built around a semantic representation of the relationships between
them. Guarino et al. (2009)[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] expanded on what is a conceptualization and the
history of the formal definition of ontologies, suggesting more precise ones.
      </p>
      <p>
        Knowledge Graphs are clusters of ontologies with common ramifications and
ways to eciently interact with them. They are important because ”are critical
to many enterprises: they provide the structured data and factual knowledge
that drive many products and make them more intelligent and magical”[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Google popularized the concept of Knowledge Graph with the launch of their
project in 2012, aimed at improving their search engine feedback[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Since then,
many projects have been trying to translate Big Data into comprehensive data
through similar methodologies, for example the ones related with the Linked
Open Data initiative, WordNet, YAGO[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], DBPedia, etc. These approaches are
expanding the concept of what we understand to be the World Wide Web,
building the basis of the Web 3.0, also known as the Semantic Web.
      </p>
      <p>This project gets inspiration from the mentioned ones, implementing
personalized methodologies based upon entities identification: a graph of articles and
metadata, expanded with relationships of entities identified inside them.</p>
      <p>These approaches reduce the man-machine gap, by giving semantic and
structural meaning to complex Big Data. SPARQL, RDF, and OWL, expressed
through Turtle, were central technologies for this stage, both recommended by
W3C for implementing Web Ontologies, trying to revolutionize the way we
interact with the Web, data and computers. Because of these characteristics,
ontologies are one of the key technologies for the implementation of the new generation
of the World Wide Web.
3.1</p>
      <sec id="sec-3-1">
        <title>Ontology Generator</title>
        <p>The ontologies underlying this project were generated dynamically. Initially we
built a skeleton of the ontologies using the software Prot`eg´e, generating a schema
with the main static structures, but not specific individual data. We saved the
ontology in the Turtle syntax, always working with this format as a basis.</p>
        <p>Later we built a tools for automatically identifying metadata from the
articles and entities inside the texts, dynamically expanding the ontology graph by
adding new contextualized Turtle segments to the initial ontology, expanding it
with individuals and ramifications, adding new facts to the pre-defined skeleton.</p>
        <p>In order to identify external entities mentioned in the articles, an
intermediary step was taken, where we developed datasets with thousands of pre-defined
real-world entities, divided into 19 categories. Some entities are complete (e.g.
Countries, Capitals, Continents, Sports, Months, etc.), but others are incomplete
because of their nature, a constant work in progress (Public Figures, Brands,
Political Parties, etc.). Various strategies were adopted in order to collect this
datasets (crawling public figures from magazines and newspapers; sources like
Wikipedia or ”dados.gov”; intensive use of RegEx etc.). This work was
contextualized to each one of the 19 datasets developed. This article, due to space
limitations, does not intend to focus the development of the datasets, but this
brief contextualization was important to understand how the ontology generator
operates. For example, at the moment, we identified in the articles references to
32.648 Persons, 8.525 Political Parties, 3.799 TV Channels, 28.933 Cities, etc.</p>
        <p>The ontology generator uses these pre-defined datasets with external entities,
identifying them inside the article using Regular Expressions - if it identifies one
entity, it generates a new Turtle segment adding new contextual graph
ramifications. This approach transforms the ontology into a Knowledge Graph, because
it is not anymore a singular a ontology of press clippings, it is a cluster of
relationships between them and external contextual data with a common interface.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Interfaces for data availability</title>
        <p>The rich ramifications of entities integrated into this Knowledge Graph, allows
the end-user to define intuitive SPARQL queries to extract very complex data,
e.g.: extraction of articles from a set of years, referring a certain Public Figure,
without a particular job, referring a specific Political Party and Brand, in may,
with a set of keywords related to two minorities, etc. ad infinitum.</p>
        <p>We built di↵erent interfaces and layers in order to interact with this data
through SPARQL queries (W3C recommended technology for querying Web
Ontologies) and APIs. Even though SPARQL is very accessible and easy to
learn, usually this technology is more commonly used by a specialized public.
For this reason, since we wanted to make this project available to the general
community (academics from all areas, journalists, educators, hobbyists, etc.), we
opted to build 3 di↵erent layers of access to the Knowledge Graph:
– A static interface4, exposing 3 galleries (articles, images and comments)
which any kind of user can navigate, but the interaction is very limited;
– A second layer for intermediate users5, with a Reactive Interface that
interacts with a visual form with 3 levels of filtering (main classes, children,
and some keywords), building automatically, in real-time, SPARQL queries
that communicate with the Knowledge Graph, extracting richer data. This
interface is open-source and can be easily adapted to any kind of ontology;
– A third layer6, for specialized public, with 2 endpoints, giving direct access to
the triplestore database and graph interfaces, and APIs to execute SPARQL
queries, with unlimited freedom for manipulating the Knowledge Graph.</p>
        <p>This project main objective is to facilitate the research of minority questions,
by providing easy and intuitive access to a contextual Knowledge Graph of
complex Big Data, usually inaccessible from the general nontechnical public. In the
background, we opted for GraphDB to expose these triplestores.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Choice of triplestore databases: pros and cons of GraphDB</title>
        <p>This project worked with the Turtle syntax to generate the ontology (alternative
RDF syntax). For making the data publicly available we opted for a dedicated
database triplestore to store it and SPARQL compliant APIs for querying it.</p>
        <p>We analysed and considered 11 dedicated ontological triplestore databases:
GraphDB, StarDog, AllegroGraph, AnzoGraph, BlazeGraph, 4store, Apache
Jena, Virtuoso, MarkLogic, RDFox and TerminusDB. We aimed for open-source
or limited free versions (for that reason some were immediately discarded
because they had proprietary licenses with fees, e.g. RDFox), SPARQL native full
support (for that reason e.g. TerminusDB was rejected) and, secondarily,
provided public beautiful visual interfaces for facilitating data exploration (for that
reason, AnzoGraph, for instance, was rejected in later stages of selection).</p>
        <p>We started by analysing published benchmarks and articles. According to
these data and initial criteria, our main preferences were GraphDB, StarDog
and AnzoGraph. Both have top performance, intuitive APIs and interfaces for
visually interacting with the ontologies. Mainly: both o↵er free versions.</p>
        <p>The majority had proprietary licenses, but some had also a free
alternative limited plan, for example: GraphDB free plan limited it to 2 simultaneous
4 Galleries: http://minors.ilch.uminho.pt/articles
5 Reactive Interface: http://minors.ilch.uminho.pt/search
6 DB: http://sparql.ilch.uminho.pt; API: http://minors.ilch.uminho.pt/sparql
queries, AnzoGraph had a limit of 8GG RAM use (increased to 16GB with a
annual registration), and StarDog (the best hybrid license).</p>
        <p>
          The 3 final choices were a balance between free, performative and interfaces.
AnzoGraph, even though where the most performative in some benchmarks[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ],
had an inferior visual interface, for that reason were rejected. In the end it was a
tie between GraphDB and StarDog. We ended opting for the first one, because
in general benchmarks were better for specific queries. For Belini et al. (2018)
”Virtuoso performs better in presence of less selective queries(...) on the contrary,
GraphDB performs better when specific results are searched”[
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], but also notes
that Virtuoso has inconsistencies constrains.
        </p>
        <p>Even though we opted for the GraphDB Free Edition, the limit of 2
simultaneously queries ended up to be a bottleneck and we ended up developing a cache
system for improving that limitation. For future projects wit similar context we
would advise for StarDog instead. Otherwise, the benchmarks di↵erences are not
that impactful between the major contenders, all have di↵erent particularities,
the context of each project should be considered.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>Major Minors provides an open-source Knowledge Graph of press clippings
focused on social minorities. It expands ontologies with semantic relationships
between thousands of real-world entities, augmenting data manipulation.</p>
      <p>
        Various projects, e.g. YAGO[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], apply similar techniques, but are more generic.
This project tried to developed its own methodology to achieve similar results
focusing on a singular thematic (minorities). The applied approach started by
developing isolated datasets of entities, created individually through crawlers
and Regular Expressions, of real-world entities, that feed an ontology generator
built to transform an ontology skeleton into an augmented Knowledge Graph.
In total, the datasets had 16.096 individual entities, divided in 19 categories.
Algorithms for prioritization and sorting were developed alongside the entities
identification. This article summarized those methodologies.
      </p>
      <p>The resulting data were stored using triplesotres databases, exposing them
through SPARQL queries. Accordingly to our context and past benchmarks, we
concluded that GraphDB and StarDog were the better choices for our necessities.
Currently, this project has 5 million triplestores, 49.000 articles archived and 8
macro minority groups with references to 256.458 entities.</p>
      <p>Various Research Groups partnerships have been established (CEHUM,
NetLang, etc.) besides the original ones (DI) in order to give longevity to this
opensource project through applied studies. In future iterations and partnerships, we
would like to expand the corpus to others timelines, newspapers and thematics.
We invite the research community to contribute to this expansion.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Addlesee</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Comparison of Linked Data Triplestores: Developing the Methodology</article-title>
          . Medium (May
          <year>2019</year>
          ), https://medium.com/wallscope/ comparison-of
          <article-title>-linked-data-triplestores-developing-the-methodology-e87771cb3011</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bellini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nesi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Performance assessment of rdf graph databases for smart city services</article-title>
          .
          <source>Journal of Visual Languages &amp; Computing</source>
          <volume>45</volume>
          ,
          <fpage>24</fpage>
          -
          <lpage>38</lpage>
          (
          <year>2018</year>
          ). https://doi.org/https://doi.org/10.1016/j.jvlc.
          <year>2018</year>
          .
          <volume>03</volume>
          .002, https://www. sciencedirect.com/science/article/pii/S1045926X1730246X
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bleich</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stonebraker</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nisar</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abdelhamid</surname>
          </string-name>
          , R.:
          <article-title>Media portrayals of minorities: Muslims in british newspaper headlines,</article-title>
          <year>2001</year>
          -
          <fpage>2012</fpage>
          .
          <source>Journal of Ethnic and Migration Studies</source>
          <volume>41</volume>
          (
          <issue>6</issue>
          ),
          <fpage>942</fpage>
          -
          <lpage>962</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gruber</surname>
          </string-name>
          , T.: Ontology.
          <source>Encyclopedia of database systems 1</source>
          ,
          <fpage>1963</fpage>
          -
          <lpage>1965</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Guarino</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oberle</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staab</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>What is an ontology? In: Handbook on ontologies</article-title>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          . Springer (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Martins</surname>
            ,
            <given-names>P.J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Costa</surname>
            ,
            <given-names>L.J.A.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramalho</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          :
          <article-title>Major Minors - Ontological Representation of Minorities by Newspapers</article-title>
          . In: Queiro´s, R.,
          <string-name>
            <surname>Pinto</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Simo˜es,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Portela</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Pereira</surname>
          </string-name>
          , M.
          <source>J.a. (eds.) 10th Symposium on Languages, Applications and Technologies (SLATE</source>
          <year>2021</year>
          ).
          <source>Open Access Series in Informatics (OASIcs)</source>
          , vol.
          <volume>94</volume>
          , pp.
          <volume>3</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>3</lpage>
          :
          <fpage>13</fpage>
          .
          <string-name>
            <surname>Schloss</surname>
          </string-name>
          Dagstuhl - Leibniz-Zentrum fu¨r Informatik, Dagstuhl, Germany (
          <year>2021</year>
          ). https://doi.org/10.4230/OASIcs.SLATE.
          <year>2021</year>
          .3, https: //drops.dagstuhl.de/opus/volltexte/2021/14420
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Morris</surname>
          </string-name>
          , R.D.:
          <article-title>Web 3.0: Implications for online learning</article-title>
          .
          <source>TechTrends</source>
          <volume>55</volume>
          (
          <issue>1</issue>
          ),
          <fpage>42</fpage>
          -
          <lpage>46</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Noy</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jain</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Narayanan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patterson</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , J.:
          <article-title>Industry-scale knowledge graphs: lessons and challenges: five diverse technology companies show how it's done</article-title>
          .
          <source>Queue</source>
          <volume>17</volume>
          (
          <issue>2</issue>
          ),
          <fpage>48</fpage>
          -
          <lpage>75</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pellissier-Tanon</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weikum</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suchanek</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Yago 4: A reason-able knowledge base</article-title>
          .
          <source>ESWC</source>
          <year>2020</year>
          (
          <year>2020</year>
          ), http://yago-knowledge.org
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Singhal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Introducing the knowledge graph: things, not strings</article-title>
          .
          <source>Ocial google blog 5</source>
          ,
          <issue>16</issue>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>