<!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>Semantic Annotation of Office Documents</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Boheng Fan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ning Li</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yingai Tian</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Beijing Information Science &amp; Technology University</institution>
          ,
          <addr-line>Beijing</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <fpage>150</fpage>
      <lpage>162</lpage>
      <abstract>
        <p>Semantic annotations can be used to add semantic metadata to documents, which enables their effective, automated analyses. However, only a few document formats (e.g., HTML, PDF) currently support semantic annotations. In office document formats represented by OOXML or ODF, semantic annotations are not yet supported. On the basis of an in-depth study of office document formats, this paper draws on the mainstream semantic metadata identification method of HTML and proposes OOXML-oriented semantic annotation rules. These rules support the addition of semantic metadata to office documents in a standardized way. In addition, pre-processing and post-processing methods are presented, which enable existing office software to read, edit, and save office documents with semantic metadata without modification. Experimental results demonstrate that the proposed approach can add semantic metadata to office documents, and the added semantic metadata can be parsed into RDF triplestructured data by mainstream validators such as W3C or Google. This research can provide a good foundation for tasks such as office document classification, office document information retrieval, and information extraction.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;document format</kwd>
        <kwd>semantic annotation</kwd>
        <kwd>RDFa</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>1. Introduction 1</p>
      <p>Beyond web applications, text is also present in a wide variety of documents including office,
fixedlayout, and complex mixed formats.</p>
      <p>
        A limited number of studies are available that focus on the semantic annotation of office documents.
Tallis [
        <xref ref-type="bibr" rid="ref9">10</xref>
        ] provides a set of semi-automatic document annotation system Semantic Word for the DOC
format. Carr [
        <xref ref-type="bibr" rid="ref10">11</xref>
        ] proposes the WICKOffice system. Fink [
        <xref ref-type="bibr" rid="ref11">12</xref>
        ] develops a Word plug-in that allows
users to manually annotate professional terms in the biomedical field in documents. However, these
annotation systems cannot support standard office document formats such as Office Open XML
(OOXML) [
        <xref ref-type="bibr" rid="ref12">13</xref>
        ], Open Document Format (ODF) [
        <xref ref-type="bibr" rid="ref13">14</xref>
        ], Unified Office document Format (UOF) [
        <xref ref-type="bibr" rid="ref14">15</xref>
        ].
And they can not support multi-source semantic annotations.
      </p>
      <p>When semantically annotating an office document, the following requirements need to be met: 1)
Ability to record semantic metadata in document formats; 2) Ability to support document format
standards such as OOXML, ODF, UOF; 3) Ability to withstand the semantic metadata editing and
modification; 4) Ability to maintain consistency between document content and semantic metadata
during document editing; 5) Ability to support multi-source semantic annotation, allowing the same
annotation content to correspond to multiple ontologies or vocabularies. These complex requirements
have impeded the development of mature tools for embedding semantic annotations in office documents.</p>
      <p>
        To address the requirements summarized above, this paper proposes a method to support the
semantic annotation of office documents. The method includes the extension method ofoffice document,
the design of semantic annotation rules and support for semantic annotations in mainstream office
software. The results of this paper have been adopted by the group standard T/CESA 1176-2021
"Information technology—Method for embedding semantic metadata into the electronic documents
[
        <xref ref-type="bibr" rid="ref15">16</xref>
        ]".
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>Although the studies has limited results on the semantic annotation of office documents, there are
some related research results that can be used for reference. For example, text in HTML is stored in a
similar way to office documents, and there are mature semantic annotation technologies for PDF.</p>
      <p>
        HTML mainly adopts the method of embedding annotations, and the results are recorded as
attributes of related elements. Tittel [
        <xref ref-type="bibr" rid="ref16">17</xref>
        ] embeds the vocabulary of RDFa-marked in web page content
on medieval French. Beno [
        <xref ref-type="bibr" rid="ref17">18</xref>
        ] developed Doc2RDFa, an HTML rich text processor capable of
automatically and manually annotating content. However, the system only targets documents in the
legal field. Salem [
        <xref ref-type="bibr" rid="ref18">19</xref>
        ] enhances original online content with semantic annotations automatically
derived from different knowledge sources. It is the transformation from a web document without
semantic annotations to another document with RDFa semantics. Albukhitan [
        <xref ref-type="bibr" rid="ref19">20</xref>
        ]、Mbouadeu [
        <xref ref-type="bibr" rid="ref20">21</xref>
        ] use
deep learning to automatically annotate HTML documents, and the results are stored in the original
document using JSON-LD or Microdata.
      </p>
      <p>
        PDF mainly uses a separate annotation method, and the results are stored in separate data blocks in
the document. Kim [
        <xref ref-type="bibr" rid="ref21">22</xref>
        ]、Eriksson [
        <xref ref-type="bibr" rid="ref22">23</xref>
        ] establish the mapping relationship between the content and an
Ontology in PDF documents by using Extensible Metadata Platform (XMP) [
        <xref ref-type="bibr" rid="ref23">24</xref>
        ].
      </p>
      <p>In the above research, the embedded annotation results are easy to manage and can ensure that the
semantic metadata are consistent with the document content. However, they have a certain impact on
the original document format. In contrast, separate annotation results need to be stored separately, which
makes it difficult to ensure that the semantic metadata are consistent with the document content, but
have less impact on the original document format.</p>
      <p>
        Among the embedded semantic annotation techniques, RDFa has stronger expressiveness and
broader applicability; it can support multiple vocabularies [
        <xref ref-type="bibr" rid="ref24">25</xref>
        ]. Therefore, in view of the many
advantages of RDFa application in HTML, this paper extends the office document format OOXML
based on RDFa so that semantic metadata can be added to office documents. At present, the OOXML
format is the most widely used in office documents, and it is often considered as a research object.
Other XML-based office document format standards such as ODF and UOF are similar, and the method
in this paper is also applicable.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Document Format Extension</title>
      <p>Before using RDFa for the semantic annotation of OOXML documents, it is first necessary to
analyze the document structure of HTML and OOXML. The news in Figure 1 is used as an example to
illustrate the analysis.</p>
      <p>At least 22 dead, more than 1,200 injured in Turkey earthquake
By Isil Sariyuc, Hamdi Alkhshali and Amir Vera, CNN
Updated: Sat, 25 Jan 2020 15:19:20 GMT</p>
      <p>Istanbul (CNN) At least 22 people died and hundreds injured in eastern Turkey after an
earthquake rattled the region on Friday evening, according to authorities.The 6.7-magnitude
quake struck near the town of Sivrice, in eastern Elazig province, collapsing at least 10
buildings, Turkish Interior Minister Sulyman Soylu said.</p>
      <p>For an HTML document, the main content is displayed by combining different block-level elements
and inline elements. Block-level elements such as 'div', 'p', etc. usually represent paragraphs or
fragments of text. Inline elements such as 'span' are usually used to refine the segmentation of local text.
Using RDFa does not affect HTML browsing. The semantic annotation of HTML using RDFa is shown
in Figure 2. There are two annotations, "Elazig province" and "Sulyman Soylu", which are the two
entity names representing a place (i.e., typeof="Place") and a person (i.e., typeof="Person"). The
vocabulary used is "http://schema.org/".</p>
      <p>&lt;div vocab="http://schema.org/"&gt;</p>
      <p>&lt;span typeof="Place" property="name"&gt;Elazig province&lt;/span&gt;,collapsing at least 10
buildings, Turkish Interior Minister</p>
      <p>&lt;span typeof="Person" property="name"&gt;Sulyman Soylu&lt;/span&gt;
&lt;/div&gt;</p>
      <p>For an OOXML document, the storage is based on the ZIP compressed packaging format [26]. The
main content of the office documents is recorded in the document.xml file in the document package.
Paragraphs are stored as paragraph elements 'p' in the OOXML format; these are the basic units that
constitute a document. The child elements of 'p' include the paragraph attribute element 'pPr' and run
element 'r'. The text in the paragraph forms multiple 'r' according to different styles. The child elements
of 'r' contain the sentence attribute element 'rPr' and the text element 't'. The text in the sentence is
recorded in the 't' element. Semantic metadata are mainly annotated at the 'r' or 't' level.</p>
      <p>RDFa attributes can be embedded into 't' or other elements as shown in Figure 3.</p>
      <p>&lt;w:p vocab="http://schema.org/"&gt;
&lt;w:r&gt;&lt;w:t typeof="Place" property="name"&gt;Elazig province&lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:r&gt;&lt;w:t&gt;,collapsing at least 10 buildings, Turkish Interior Minister&lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:r&gt;&lt;w:t typeof="Person" property="name"&gt; Sulyman Soylu&lt;/w:t&gt;&lt;/w:r&gt;
&lt;/w:p&gt;</p>
      <p>For the general situation that is described above, this way of extending OOXML based on RDFa is
feasible. However, OOXML is different from HTML. OOXML is mainly used for editing office
documents, and its document data and semantic information have a relatively complex relationship.
This complexity leads to the following issues:</p>
      <p>1. The scope of semantic annotations in OOXML may be inconsistent with the scope of text
elements in two cases:
a) A single text may correspond to multiple semantic annotations. In the above example, entities
such as "Istanbul", "Turkey" appear under the same 't'. Since 't' is already the smallest unit of text, it is
impossible to assign different RDFa properties to different entities. This is illustrated in Figure 4.
&lt;w:p&gt;</p>
      <p>&lt;w:r&gt;&lt;w:t&gt;Istanbul (CNN) At least 22 people died and hundreds injured in eastern
Turkey after an earthquake rattled the region on Friday evening, according to authorities.</p>
      <p>&lt;/w:t&gt;&lt;/w:r&gt;
&lt;/w:p&gt;</p>
      <p>b) The content to be annotated may be scattered among multiple run elements 'r' or text elements
't'. In office software such as Microsoft Word, the texts of different formats are automatically divided
into different run elements 'r'. It is difficult to obtain a complete annotation. "Isil Sariyuc" in the example
illustrated in Figure 5 is placed in multiple run elements 'r' or text elements 't'
&lt;w:p&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Isil &lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Sariyuc&lt;/w:t&gt;&lt;/w:r&gt;
&lt;/w:p&gt;</p>
      <p>2. HTML is used for viewing, there is no need for readers to support editing functions. In contrast,
OOXML supports editing, so documents with embedded semantic metadata need to be able to be
opened and edited by office software. In addition, the embedded semantic metadata need to be robust
and withstand repeated editing.</p>
      <p>In summary, semantic annotation rules and office software that support semantic annotations for
office documents are needed.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Semantic Annotation Rules</title>
      <p>In order to ensure the consistency of semantic annotations in OOXML within the scope of text
elements, this paper proposes a model for office document annotations. The annotation model is shown
in Figure 6.</p>
      <p>The annotation model is described by an XML schema. The root element is "metadata", which has
three attributes: @ID, @Seq, and @Begin. Any RDFa property can also be used.</p>
      <p>For the case where a single text corresponds to multiple semantic annotation content, multiple
content to be annotated in the text element 't' can be placed into multiple 'metadata' element nodes for
description; the relevant text is set as 'metadata' in the content of the element. Taking "Istanbul",
"Turkey", and "earthquake" in Figure 4 as examples, the results of their annotations are shown in Figure
7.</p>
      <p>&lt;w:t vocab=" http://schema.org/"&gt;</p>
      <p>&lt;dsm:metadata rdfa:typeof="Place" rdfa:property="name"&gt;Istanbul&lt;/dsm:metadata&gt;
(CNN) At least 22 people died and hundreds injured in eastern</p>
      <p>&lt;dsm:metadata rdfa:typeof="Place" rdfa:property="name"&gt;Turkey&lt;/dsm:metadata&gt;
after an</p>
      <p>&lt;dsm:metadata rdfa:typeof="Event"
rdfa:property="name"&gt;earthquake&lt;/dsm:metadata&gt; rattled the region on Friday evening, according to authorities.</p>
      <p>&lt;/w:t&gt;</p>
      <p>In Figure 7, "Istanbul" and "Turkey" are place (rdfa:typeof="Place") names (rdfa:property="name");
"earthquake" is the name (rdfa:property="name") of the event (rdfa:typeof="Event"). These annotations
utilize the vocabulary "http://schema.org/".</p>
      <p>For the case in which the content to be annotated is scattered in multiple run elements 'r' or text
elements 't', multiple semantic annotations can be combined in sequence by specifying the @ID and
@Seq attributes in the 'metadata' element, where @ID is the number of the marked entity and @Seq is
the sequence number of the annotation. @ID combined with @Seq can realize multi-segment
annotations of the same entity. @Begin indicates the start or end of an annotation.</p>
      <p>For example, "Isil Sariyuc" is the editor of this news. In some vocabularies, name is further refined
into first and last names. Therefore, "Isil Sariyuc" is annotated as two entities, namely "Isil" and
"Sariyuc". The annotation results are shown in Figure 8.</p>
      <p>1 &lt;dsm:metadata ID="a0" Seq="1" Begin="true" rdfa:vocab="http://schema.org/"
rdfa:typeof="Person" rdfa:property="name"/&gt;
2 &lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Is&lt;/w:t&gt;&lt;/w:r&gt;
3 &lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;il &lt;/w:t&gt;&lt;/w:r&gt;
4 &lt;dsm:metadata ID="a0" Seq="1" Begin="false"/&gt;
5 &lt;dsm:metadata ID="a0" Seq="2" Begin="true" rdfa:vocab="http://schema.org/"
rdfa:typeof="Person" rdfa:property="name"/&gt;
6 &lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Sari&lt;/w:t&gt;&lt;/w:r&gt;
7 &lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;yuc&lt;/w:t&gt;&lt;/w:r&gt;
8 &lt;dsm:metadata ID="a0" Seq="2" Begin="false"/&gt;</p>
      <p>The two metadata element nodes described in lines 1-4 and 5-8 in Figure 8 have the same @ID to
indicate that they collectively annotate one person entity. The annotations are delineated with
@Begin="true" in the metadata element node of line 1 and @Begin="false" in the metadata element
node of line 4. They have the same @Seq attribute (Seq="1") to indicate that they are for one person
entity in the vocabulary "http://schema.org/" (rdfa:vocab="http://schema.org/" rdfa:typeof="Person"
rdfa:property="name"). The first part of the annotation corresponds to the text "Is", "il" in the two
sentence elements 'r'. Similarly, lines 5-8 indicate that the annotation content of the second part of the
person entity corresponds to the text "Sari" and "yuc".</p>
    </sec>
    <sec id="sec-5">
      <title>5. Semantic Document Editing and Processing</title>
      <p>The OOXML document that is extended by adding RDFa attributes to the document in OOXML
format is called a semantic document. However, this extension prevents word processing software from
opening and editing semantic documents properly. This paper proposes a solution to achieve seamless
switching between semantic documents and ordinary office documents through pre-processing and
post-processing methods.
5.1.</p>
    </sec>
    <sec id="sec-6">
      <title>Semantic Document Pre-processing and Conversion</title>
      <p>During pre-processing, the comment mechanism in the office document is used as the carrier for
recording semantic metadata in the word processing software. The semantic metadata marked in the
semantic document are stored in comments. Comments in office documents are annotation information
attached to document content fragments. Comments are displayed independently and associated with
the original text, pictures, and other content in office documents. The comments do not impact the
typesetting style of the original document; they are convenient for people to observe and operate. At
the same time, users can directly edit and modify comments when editing the original text of the
document, which provides a robust editing environment. Therefore, using comments to store semantic
metadata allows users to edit and modify semantic metadata in the editing process. It is also possible to
keep the semantic metadata consistent during editing.</p>
      <p>In document.xml in the OOXML packaged file, comments are described by three elements:
'commentRangeStart', 'commentRangeEnd', and 'commentReference'. Among them,
'commentRangeStart' and 'commentRangeEnd' determine the starting position and ending position of
the comment, indicating the range of the comment (comment.Range). The 'commentReference' element
is associated with the content of the comment element in comment.xml; it is used to display the content
of the comment in word processing software. In a comment, the above four elements have the same
attribute @id. For example, after annotating "Istanbul" in Figure 1, document.xml appears as shown in
Figure 9.</p>
      <p>&lt;w:commentRangeStart w:id="0"/&gt;
&lt;w:r&gt;</p>
      <p>&lt;w:t&gt;Istanbul&lt;/w:t&gt;
&lt;/w:r&gt;
&lt;w:commentRangeEnd w:id="0"/&gt;
&lt;w:r&gt;</p>
      <p>&lt;w:commentReference w:id="0"/&gt;
&lt;/w:r&gt;</p>
      <p>&lt;w:comment w:id="0"/&gt;
&lt;w:p&gt;</p>
      <p>&lt;w:r&gt;&lt;w:t&gt;comment content&lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:p&gt;
&lt;/w:comment&gt;</p>
      <p>The annotation is associated with the comment.xml file structure as shown in Figure 10.</p>
      <p>To distinguish between general comments and comments containing semantic metadata, a special
username "dsm" is used for semantic metadata comments. The assumption is that the special username
is only associated with semantic comments. In the future, a special type for document comments can
be investigated to record semantic metadata in office documents. However, this requires revising the
relevant standards through standards development organizations.</p>
      <p>The core idea of the pre-processing algorithm is to identify the scope of each semantic annotation.
That is, the scope of the semantic elements’ 'metadata' determines the scope of the office documents
comment. According to the recorded semantic metadata, the content of the office documents comment
is determined.</p>
      <p>When determining the scope of comments in an office document, two cases can occur: (1) There are
multiple semantic annotation entities under a single text element 't'; (2) An annotation entity is described
by multiple run elements 'r' or text elements 't'. For case 1, the document structure needs to be adjusted
in order to comply with the standard format of OOXML. Specifically, it is necessary to copy multiple
'r' and 't' element nodes and ensure that each 't' contains only one element 'metadata'. For case 2, the
comment range can be determined directly according to the two element nodes’ 'metadata'. In this paper,
the following algorithms are used to pre-process semantic documents.</p>
      <p>Algorithm 1 is used to generate comments, including the range and content of comments. Algorithm
2 is the flow of the pre-processing algorithm. In Algorithm 2, step 2-3 declares the set of comments to
be added and assigns the value to be empty. Steps 4-22 are the process of generating semantic metadata
comments. Among them, steps 4-10 are used to adjust the document structure, which corresponds to
the first case of determining the range of comments described above. In steps 11-22, if the annotated
entity is described by multiple run elements 'r' or text elements 't', thenperform steps 13-17. After
determining the start and end positions of annotated entity, call algorithm 1 to generate semantic
comment; otherwise, according to the document structure generated in steps 4-10, Algorithm 1 is
directly invoked to generate semantic comment. Steps 23-25 output the converted office documents
conforming to the OOXML standard.
5.2.</p>
    </sec>
    <sec id="sec-7">
      <title>Semantic Document Post-processing and Conversion</title>
      <p>The purpose of post-processing is opposite to that of pre-processing. The core idea is to find each
annotation with semantic metadata and its scope in office documents, so as to determine the content
and scope of semantic annotations. There are also two cases: (1) the entity is described by a single text
element 't'; (2) the entity is described by multiple run elements 'r' and text elements 't'. For case 1, the
entity is placed into the 'metadata' element node for description, and the content of the annotation is
placed into the 'metadata' attribute. For case 2, two 'metadata' element nodes need to be added. This is
accomplished by setting the corresponding @Begin and inserting the nodes after the
'commentRangeStart' and before the 'commentRangeEnd'. The content of the comment is placed in the
'metadata' attribute whose @Begin value is true. In this paper, the following algorithm is used for
postprocessing semantic documents.</p>
      <p>Algorithm3：BackwardTransform
Input：D as the document in the standard format
Output：D as the semantic document
1 Function BackwardTransform(D)
2 For each comment node c in D
3 If c.user is "dsm" Then
4 Let n be the semantic node;
5 If c spans multiple text segment Then
6 n.id ← GenerateID(); // Generate ID
7 n.metadata ← c.content;
8 Insert n at the first text node;
9 Add end tag of n with n.id at the end of c.range;
10 Else // c spans single text node t
11 n.id ← GenerateID();
12 n.metadata ← c.content;
13 Insert n at t;
14 End If
15 Remove c;
16 End If
17 End For
18 Output D;
19End Function</p>
      <p>In Algorithm 3, steps 2-17 are the process of adding the semantic element 'metadata'. In step 3, it is
determined whether comments is a semantic metadata comments according to comments user name. If
it is determined to be true, perform steps 4-15. Steps 5-14 are used to add the positions and content of
semantic element 'metadata'. Among them, if the entity is described by multiple texts, perform steps
69 to assign the comment content to the attribute of the semantic element 'metadata' whose @Begin value
is "true"; otherwise, perform steps 11-13, assign the comment content to the attribute of semantic
element metadata, and insert 'metadata' under the text element 't'. Steps 18-19 output the semantic
document generated by conversion.</p>
    </sec>
    <sec id="sec-8">
      <title>6. Experiment</title>
      <p>A semantic annotation tool is implemented for office documents based on C# and the winform
designer. The tool has three functions: semantic annotation, pre-processing conversion, and
postprocessing conversion.</p>
      <p>Taking the news in Figure 1 as an example, it is annotated according to the afore-mentioned semantic
annotation rules for office documents. This example involves multiple entity objects, such as "Istanbul",
"Elazig province", "earthquake", and so on. When applying the proposed method for entity annotation,
it is necessary to select the appropriate type from the Schema.org vocabulary according to the nature of
the object, and also select the appropriate attribute. Taking the first paragraph of the news example as
an example, the annotation results are shown in Figure 11.</p>
      <p>&lt;w:p vocab="http://schema.org"&gt;</p>
      <p>&lt;dsm:metadata ID="a0" Seq="1" Begin="true" rdfa:typeof="Person"
rdfa:property="name"/&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Is&lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;il &lt;/w:t&gt;&lt;/w:r&gt;
&lt;dsm:metadata ID="a0" Seq="1" Begin="false"/&gt;
&lt;dsm:metadata ID="a0" Seq="2" Begin="true" rdfa:typeof="Person"
rdfa:property="name"/&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;Sari&lt;/w:t&gt;&lt;/w:r&gt;
&lt;w:r&gt;&lt;w:t xml:space="preserve"&gt;yuc&lt;/w:t&gt;&lt;/w:r&gt;
&lt;dsm:metadata ID="a0" Seq="2" Begin="false"/&gt;
&lt;w:r&gt;
&lt;w:t&gt;</p>
      <p>&lt;dsm:metadata rdfa:typeof="Place" rdfa:property="name"&gt;
Istanbul&lt;/dsm:metadata"&gt; (</p>
      <p>&lt;dsm:metadata rdfa:typeof="Organization"
rdfa:property="name"&gt;CNN&lt;/dsm:metadata"&gt;) At least 22 people died and hundreds injured in</p>
      <p>&lt;dsm:metadata rdfa:typeof="Place" rdfa:property="name"&gt; eastern
Turkey&lt;/dsm:metadata&gt; after an</p>
      <p>&lt;dsm:metadata rdfa:typeof="Event" rdfa:property="name"&gt; earthquake
&lt;/dsm:metadata&gt;rattled the region on</p>
      <p>&lt;dsm:metadata rdfa:typeof="Event" rdfa:property="startTime"&gt;Friday
evening&lt;/dsm:metadata&gt;, according to authorities.</p>
      <p>&lt;/w:t&gt;
&lt;/w:r&gt;
&lt;/w:p&gt;</p>
      <p>The above-mentioned extended OOXML document is pre-processed and converted into a standard
OOXML document. Figure 12 shows the editing interface after the office software Microsoft Word
opens the document. As can be seen in Figure 12, the seman-tic metadata in the semantic document are
presented in the form of comments in the Word document. Users can readily view and edit these
comments. The semantic user name is "dsm" and each semantic comment corresponds to a named entity.</p>
      <p>The semantic document structure obtained by the post-processing conversion of the office document
shown in Fig 12 is consistent with that in Fig11.</p>
      <p>Semantic documents can be checked for RDFa syntax correctness using the Google Structured
Testing Tool or the RDFa.info[27] validator. The semantic metadata of the RDF triple structure can
also be extracted using GRDDL [28] or W3C's RDFa parser to generate Turtle, RDF/XML, or N-Triples
files. The parsed structured data in Figure 13 shows that the semantic document can be verified by the
RDFa.info testing tool.</p>
      <p>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix schema: &lt;http://schema.org/&gt; .
_:1
rdf:type schema:Person;
schema:name "Isil Sariyuce" .
_:2
rdf:type schema:Place;
schema:name "Istanbul" .
_:3
rdf:type schema:Organization;
schema:name "CNN" .
_:4
rdf:type schema:Place;
schema:name " eastern Turkey " .
&lt;http://rdfa.info/play/item5&gt;
rdf:type schema:Event;
schema:name " earthquake ";
schema:startDate "Friday evening".</p>
      <p>Based on RDF data, knowledge graphs can be further generated. Figure 14 is a knowledge graph
corresponding to part of the semantic annotation content of Figure 11.</p>
      <p>The above results indicate that the proposed method successfully realizes the semantic annotation
of office documents, which supports the effective extraction of knowledge from documents.</p>
    </sec>
    <sec id="sec-9">
      <title>7. Conclusion</title>
      <p>This paper takes OOXML as the research object, and analyzes in detail the differences between the
OOXML format and the HTML format for text descriptions. On this basis, a method for the semantic
annotation of office documents is proposed. According to the format characteristics of office documents,
specific semantic annotation rules are designed. At the same time, an approach to achieve seamless
switching between semantic documents and office documents through pre-processing and
postprocessing methods is proposed. This ensures the marked documents can be supported by word
processing software after pre-processing. After post-processing, office documents with semantic
annotations can be reformed into semantic documents. Experiments show that the use of the proposed
annotation method can enhance the semantic representation ability of office documents; in turn, this
can support the automated analysis of annotated documents.</p>
      <p>This paper mainly focuses on semantic annotation of office documents in OOXML format. The
approach can be extended to ODF, UOF, and other formats in the future, which can broaden support
for including semantic annotations in a wider variety of office document formats. In addition, the
annotation object in this paper is text; the semantic annotation of other objects such as images, tables,
formulas, and so on has not been considered. As their structure is more complex, further research and
improvement of the annotation method are needed. Natural language processing technology can also
be considered in the future to realize automatic or interactive semantic annotation and improve the
efficiency of annotation.</p>
    </sec>
    <sec id="sec-10">
      <title>8. Acknowledgements</title>
    </sec>
    <sec id="sec-11">
      <title>9. References</title>
      <p>Project supported by National Natural Science Foundation of China: The Intelligent Analysis and
Optimization Method for Reflowable Documents (61672105).
[1] Fu Zhu. (2014) A Review of Semantic Annotation for Text Documents. Journal of the China
Society for Scientific and Technical Information, 4:439-448.
[26] ISO/IEC. (2021) ISO/IEC 29500-2. 2021Document description and processing languages —</p>
      <p>Office Open XML file formats — Part 2: Open packaging conventions.
[27] Buraga S C. and Panu A. (2013) A web tool for extracting and viewing the semantic markups.</p>
      <p>International Conference on Knowledge Science，Engineering and Management, Berlin, Springer,
2013, 570-579.
[28] Hazayul-Massieux D. and Connolly D. Gleaning resource descriptions from dialects of languages
(grddl). World Wide Web Consortium, W3C Coordination Group Note NOTE-grddl-20040413.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Sikos</surname>
            ,
            <given-names>Leslie.</given-names>
          </string-name>
          (
          <year>2015</year>
          )
          <article-title>Mastering structured data on the Semantic Web: From HTML5 microdata to linked open data</article-title>
          .
          <source>Apress.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [3]
          <fpage>W3C</fpage>
          .
          <article-title>(2015) XHTML+RDFa 1</article-title>
          .
          <fpage>1</fpage>
          -
          <string-name>
            <given-names>Third</given-names>
            <surname>Edition</surname>
          </string-name>
          . https://www.w3.org/TR/xhtml-rdfa/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Guha</surname>
            <given-names>R V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brickley</surname>
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Macbeth</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2016</year>
          )
          <article-title>Schema.org: Evolution of Structured Data on the Web</article-title>
          .
          <source>Communications of the ACM</source>
          ,
          <volume>59</volume>
          ,(
          <issue>2</issue>
          ):
          <fpage>44</fpage>
          -
          <lpage>51</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Zhang Z.</given-names>
            ,
            <surname>Bizer</surname>
          </string-name>
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Peeters</surname>
          </string-name>
          <string-name>
            <given-names>R.</given-names>
            and
            <surname>Primpeli</surname>
          </string-name>
          <string-name>
            <surname>A.</surname>
          </string-name>
          (
          <year>2020</year>
          )
          <article-title>MWPD2020: Semantic Web Challenge on Mining the Web of HTML-embedded Product Data</article-title>
          .
          <source>Proceedings of CEUR Workshop</source>
          , RWTH,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Zhang Z.</given-names>
            and
            <surname>Paramita</surname>
          </string-name>
          <string-name>
            <surname>M.</surname>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>Product Classification Using Microdata Annotations</article-title>
          .
          <source>International Semantic Web Conference</source>
          , Springer, Cham,
          <year>2019</year>
          ,
          <fpage>716</fpage>
          -
          <lpage>732</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Peeters</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Primpeli</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wichtlhuber</surname>
            <given-names>B.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Bizer</surname>
            <given-names>C.</given-names>
          </string-name>
          (
          <year>2020</year>
          )
          <article-title>Using Schema.org Annotations for Training and Maintaining Product Matchers</article-title>
          .
          <source>Proc of the 10th International Conference on Web Intelligence, Mining and Semantics</source>
          ,
          <year>2020</year>
          ,
          <fpage>195</fpage>
          -
          <lpage>204</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Bai</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ge</surname>
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            <given-names>F.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lu</surname>
            <given-names>H.</given-names>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>Joint interaction with context operation for collaborative filtering</article-title>
          .
          <source>Pattern Recognition</source>
          ,
          <volume>88</volume>
          :
          <fpage>729</fpage>
          -
          <lpage>738</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Dong</surname>
            <given-names>X L.</given-names>
          </string-name>
          (
          <year>2018</year>
          )
          <article-title>Challenges and Innovations in Building a Product Knowledge Graph</article-title>
          .
          <source>Proc of the 24th ACM SIGKDD International Conference on Knowledge Discovery &amp; Data Mining</source>
          ,
          <year>2018</year>
          ,
          <fpage>2869</fpage>
          -
          <lpage>2869</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Tallis</surname>
            <given-names>M. Semantic</given-names>
          </string-name>
          <article-title>Word processing for content authors</article-title>
          .
          <source>Proceedings of the Knowledge Markup &amp; Semantic Annotation Workshop</source>
          , Florida, USA,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Carr</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miles-Board</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wills</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <article-title>Woukeu A</article-title>
          . and
          <string-name>
            <surname>Hall</surname>
            <given-names>W.</given-names>
          </string-name>
          (
          <year>2004</year>
          )
          <article-title>Towards a knowledge-aware office environment</article-title>
          .
          <source>International Conference on Practical Aspects of Knowledge Management</source>
          , Springer, Berlin, Heidelberg,
          <year>2004</year>
          ,
          <fpage>129</fpage>
          -
          <lpage>140</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Fink</surname>
            <given-names>JL.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fernicola</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chandran</surname>
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parastatidis</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wade</surname>
            <given-names>A.</given-names>
          </string-name>
          AND
          <string-name>
            <surname>Naim</surname>
            <given-names>O.</given-names>
          </string-name>
          (
          <year>2010</year>
          )
          <article-title>Word add-in for ontology recognition: semantic enrichment of scientific literature</article-title>
          .
          <source>BMC bioinformatics</source>
          ,
          <volume>11</volume>
          , (
          <issue>1</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <source>[13] ISO/IEC 29500-1:2016 Information technology - Document description and processing languages - Office Open XML File Formats</source>
          . (
          <year>2004</year>
          ) .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [14] ISO/IEC 26300:
          <year>2015</year>
          <article-title>Information technology - Open Document Format for Office Applications (OpenDocument) v1</article-title>
          .
          <fpage>2</fpage>
          . (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [15] GB/T 20916 - 2007: UOF--
          <source>Unified Office document Format</source>
          (
          <year>2007</year>
          ). China Standards Press, Beijing.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [16] T/CESA 1176-2021
          <string-name>
            <given-names>Information</given-names>
            <surname>Technology Electronic Document Semantic Metadata Embedding Method</surname>
          </string-name>
          .
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [17]
          <string-name>
            <surname>Tittel</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bermyudez-Sabel H</surname>
          </string-name>
          . and
          <string-name>
            <surname>Chiarcos</surname>
            <given-names>C.</given-names>
          </string-name>
          (
          <year>2018</year>
          )
          <article-title>Using RDFa to link text and dictionary data for Medieval French</article-title>
          .
          <source>Proc of the Eleventh International Conference on Language Resources and Evaluation</source>
          , Miyazaki, Japan,
          <year>2018</year>
          ,
          <fpage>7</fpage>
          -
          <lpage>12</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [18]
          <string-name>
            <surname>Beno</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Filtz</surname>
            <given-names>E.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Kirrane</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>Doc2RDFa: semantic annotation for web documents</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Salem</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mazzara</surname>
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Elnaffar</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2021</year>
          )
          <article-title>Automatically Injecting Semantic Annotations into Online Articles</article-title>
          .
          <source>International Conference on Advanced Information Networking and Applications</source>
          , Springer, Cham,
          <year>2021</year>
          ,
          <fpage>617</fpage>
          -
          <lpage>624</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Mbouadeu</surname>
            <given-names>S F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Keshtkar</surname>
            <given-names>F.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Bukhari S A C.</surname>
          </string-name>
          <article-title>(2021) Semantically: A Framework for Structured Biomedical Content Authoring</article-title>
          and Publishing.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Albukhitan</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alnazer</surname>
            <given-names>A.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Helmy</surname>
            <given-names>T.</given-names>
          </string-name>
          (
          <year>2018</year>
          )
          <article-title>Semantic annotation of arabic web documents using deep learning</article-title>
          .
          <source>Procedia Computer Science</source>
          ,
          <volume>130</volume>
          ,
          <fpage>589</fpage>
          -
          <lpage>596</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Kim</surname>
            <given-names>H L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim H G. and Decker</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2006</year>
          )
          <article-title>Semantic documentation using semantic web technologies and social web services</article-title>
          .
          <source>International Conference on Next Generation Web Services Practices</source>
          , IEEE,
          <year>2006</year>
          ,
          <fpage>27</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Eriksson</surname>
            <given-names>H.</given-names>
          </string-name>
          (
          <year>2007</year>
          )
          <article-title>The semantic-document approach to combining documents and ontologies</article-title>
          .
          <source>International journal of human-computer studies</source>
          ,
          <volume>65</volume>
          , (
          <issue>7</issue>
          ):
          <fpage>624</fpage>
          -
          <lpage>639</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [24]
          <string-name>
            <surname>IX-ISO.</surname>
          </string-name>
          (
          <year>2012</year>
          )
          <article-title>ISO 16684-1-2012</article-title>
          .
          <article-title>Graphics Technology Extensible Metadata Platform (XMP) Specification Part 1: Data Modeling, Serialization</article-title>
          and
          <string-name>
            <given-names>Core</given-names>
            <surname>Properties</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [25]
          <string-name>
            <surname>Song</surname>
            <given-names>Yu.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Zheng</given-names>
            <surname>Yi</surname>
          </string-name>
          . and
          <string-name>
            <given-names>Wu</given-names>
            <surname>Yan</surname>
          </string-name>
          .
          <article-title>(2009) Overview of RDFa semantic annotation techniques</article-title>
          .
          <source>Proc of National Conference on Computer Networks and Communications</source>
          ,
          <volume>300</volume>
          -
          <fpage>306</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>