<!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>MEL: Metadata Extractor &amp; Loader</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Australian National University</institution>
          ,
          <addr-line>Canberra ACT 2601, AU</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>The metadata and content-based information extraction tasks from heterogeneous le sets are pre-processing steps of many Knowledge Graph Construction Pipelines (KGCP). These tasks often take longer than necessary due to the lack of proper tools that integrate several complementary extraction methods and properties to get a rich output set. This paper presents MEL, a Python-based tool that implements a set of methods to extract metadata and content-based information from unstructured information encoded in di erent source document formats. The results are generated as JSON les, which can: (a) optionally be stored in a document store, and (b) easily be mapped to RDF using a variety of tools such as J2RM. MEL supports more than 20 di erent le types, making it a versatile tool that aids pre-processing tasks as part of a KGCP based on comprehensive con gurable settings.</p>
      </abstract>
      <kwd-group>
        <kwd>Metadata Extraction</kwd>
        <kwd>Information Extraction</kwd>
        <kwd>Data Preprocessing</kwd>
        <kwd>Knowledge Graph Construction</kwd>
        <kwd>Data Analysis Pipeline</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>This paper introduces MEL5, a tool that implements a set of methods to extract
metadata and content-based information from various le formats as JSON6
objects. For each supported le type, MEL extracts the textual content from the
source document and performs speci c pre-processing and data cleaning tasks.
Also, it performs basic text analysis tasks (pattern matching and keyword
extraction) and generates the results in a machine-readable format (JSON), preparing
Copyright © 2021 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
5 The submission type of this paper is a demonstration that portraits the tool's
general functionality. The demo presents: input document set, initial settings,
processing, and output set. The input document set is arti cial in order to show various
capabilities of the tool for di erent le types and formats. All resources and demo
videos are available at https://w3id.org/kgcp/MEL-TNNT
6 https://www.json.org/
the ground for content-based analysis. MEL is integrated with \The NLP7-NER8
Toolkit" (TNNT ), which automates the extraction task of categorised named
entities from the MEL results by using diverse state-of-the-art NLP tools and
NER models [5]. MEL implements primitives for metadata and content
extraction from unstructured data sets of heterogeneous formats, and along with the
TNNT results, it provides the groundwork for content-based analysis. MEL and
TNNT were developed in conjunction with J2RM [4], to easily map the JSON
results to RDF as part of an automated KGCP9.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Core Features</title>
      <p>
        MEL has comprehensive metadata extraction support of various le types and
formats. In a nutshell: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) it takes as input a document ( le) set; (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) then, for each
document, it extracts its related metadata and content-based information, while
performing basic text analysis (such as applying a con gurable set of regular
expressions and keyword extraction task); and, (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) as output, it generates a
JSON le with the extracted metadata and text content with a structure based
on the supported formats' document object model. It can store the results in
a document store10. MEL's general output structure is presented in Table 1.
MEL has a detailed con guration JSON le that de nes how the processing will
be performed through a set of parameters and ags that establish the initial
settings related to the document store, input document sets, TNNT general
con guration, le extension mappings, the \Associated-Metadata" processing
(Table 1), and regular expressions to apply in the text analysis task, among other
7 Natural Language Processing
8 Name Entity Recognition
9 https://w3id.org/kgcp
10 Currently, the tool only supports CouchDB (https://couchdb.apache.org/).
      </p>
      <p>NMumaxb.er Number</p>
      <p>Avg.
55 24
&gt;50 28
34
45
54
45
|
|
|
|
settings. The supported le types are presented in Table 2. The third column
shows the theoretical number of attributes that the tool is able to extract per
document type, whilst the fourth column shows the average of the extracted
attributes from four use case document sets11. OLE 2 le types12 and .docm
can only be processed on Windows operating systems. Speci cally for OLE 2 le
types, MEL uses the olemeta tool13.</p>
    </sec>
    <sec id="sec-3">
      <title>3 Architecture</title>
      <p>MEL is fully integrated with TNNT as depicted in Figure 1. The set of
Pythonbased methods implemented in MEL are generic and can be applied to extract
the content and metadata of all supported le types. MEL uses various
opensource packages and tools with complementary capabilities to form a \Swiss
army knife" of metadata and content-based information extraction from
heterogeneous document sets. As part of the \General-Metadata" extraction task,
MEL optionally uses the XML14 output from the NLNZ Metadata
Extractor tool15, a Java standalone tool that extracts a comprehensive attribute and
11 Each set ranges from 1,174 to 3,334 documents. They are government documents
about assessments, endangered species, federal budget, and procurement, all from the
\Australian Government Records Interoperability Framework" (AGRIF) [1] project.
12 https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oleds/
fdc5e702-d09e-4344-a77f-eb079d41f23f
13 http://www.decalage.info/python/oletools/
14 Extensible Markup Language.
15 http://meta-extractor.sourceforge.net/
property list from dozens of le formats. The MEL general processing model is
presented in Figure 2. It is important to note that each le type has its own
speci c processing model as well as the text analysis task, which is the last step
that is performed for any output.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>The most comprehensive and current state-of-the-art tool for content extraction
and analysis is Apache Tika16, which is a complete and complex Java-based
general-purpose system. While MEL's core goals resemble the ones of Apache
Tika, the main di erence and bene t of MEL as compared to Apache Tika is
that it is a lightweight Python-based package for the metadata extraction of
common le formats aimed to be used in a KGCP. Although there is a wide
range of Python-based tools and libraries for metadata extraction, to the best of
our knowledge, there is no package available that fully integrates in one system
a comprehensive set of methods for metadata and content extraction of common
le formats that generate the results in JSON structures based on the document
16 https://tika.apache.org/
object model of each format type. Last, MEL can assist in the information
extraction stage of several KGCPs, such as the ones described in [6], [2], and [3].
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and Future Work</title>
      <p>MEL provides a versatile mechanism to extract metadata and content-based
information from unstructured data sets of heterogeneous le formats, agnostic
of the data sets' domain (general purpose). It has been tested over thousands of
documents using di erent formats and datasets as part of the AGRIF project.
Based on the structure of the MEL's JSON results, it is possible to easily add
a vocabulary or light-weight ontology using JSON-LD17 annotations, in order
to make the extracted metadata \RDF ready". This will be explored in the
near future leveraging on the integration with JSON-LD ontologies. More le
formats will be added in a per use-case requirements basis, in order to support
KGCP tasks. Additionally, a project to \containerise" the MEL+TNNT tools
is planned in the near future.</p>
      <p>
        The major contributions of this tool are: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) the ability to extract metadata
sets and content-based information from di erent source document formats; (
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
the comprehensive support of over 20 di erent le types/formats integrated into
one easy-to-use Python-based system; (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) integration with TNNT which
automates the extraction of categorised named entities from the results by using
diverse state-of-the-art NLP tools and NER models; and (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) the JSON result
les can be easily mapped to RDF using J2RM.
17 https://www.w3.org/TR/json-ld11/
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Department of Finance: AGRIF Ontology.
          <article-title>Ontology Speci cation</article-title>
          , Australian
          <string-name>
            <surname>Government</surname>
          </string-name>
          (
          <year>2018</year>
          ), http://linked.data.gov.au/def/agrif
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Elhammadi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>V.S.</given-names>
            <surname>Lakshmanan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Ng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Simpson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Huai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>L.:</surname>
          </string-name>
          <article-title>A high precision pipeline for nancial knowledge graph construction</article-title>
          .
          <source>In: Proceedings of the 28th International Conference on Computational Linguistics</source>
          . pp.
          <volume>967</volume>
          {
          <issue>977</issue>
          (
          <year>2020</year>
          ). https://doi.org/10.18653/v1/
          <year>2020</year>
          .coling-main.
          <fpage>84</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Jia</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sheng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>EasyKG: An End-to-End Knowledge Graph Construction System</article-title>
          , pp.
          <volume>221</volume>
          {
          <issue>228</issue>
          (
          <year>2020</year>
          ). https://doi.org/10.1007/
          <fpage>978</fpage>
          -981-15-3412-6 22
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Rodr guez Mendez,
          <string-name>
            <given-names>S.J.</given-names>
            ,
            <surname>Haller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Omran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.G.</given-names>
            ,
            <surname>Taylor</surname>
          </string-name>
          , K.:
          <article-title>J2RM: an Ontologybased JSON-to-RDF Mapping Tool</article-title>
          . In: ISWC:
          <article-title>Posters &amp; Demos Track</article-title>
          . vol.
          <volume>2721</volume>
          , pp.
          <volume>368</volume>
          {
          <fpage>373</fpage>
          .
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          (
          <year>2020</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2721</volume>
          /paper593.pdf
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Seneviratne</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Rodr guez Mendez,
          <string-name>
            <given-names>S.J.</given-names>
            ,
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            ,
            <surname>Omran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.G.</given-names>
            ,
            <surname>Taylor</surname>
          </string-name>
          , K.,
          <string-name>
            <surname>Haller</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>TNNT: The Named Entity Recognition Toolkit</article-title>
          . In: arXiv (
          <year>2021</year>
          ), https:// arxiv.org/abs/2108.13700
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Simsek</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Umbrich</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fensel</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Towards a knowledge graph lifecycle: A pipeline for the population of a commercial knowledge graph</article-title>
          .
          <source>In: Qurator</source>
          (
          <year>2020</year>
          ), http: //ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2535</volume>
          /paper_10.pdf
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>