This tutorial describes the tools that been developed by MPIWG for the RDFization of existing content and for the Mapping into the Europeana Data Model. These tools are closely related to the WP2 of the DM2E project. = XML Workflow Tools = [[PageOutline(1-4,,pullout)]] [[Image(dm2e.png)]][[http://dm2e.eu]] The process of data publishing into echo is complex. The initial input of this process is a file that should be transformed several times by different scripts written in different programming languages. In order to facilitate this process, MPIWG decided to implement a tool that supports the data publishing into echo. This tool is called XML Workflow. The XML Workflow tool is a Java web application developed by Jorge Urzua for running text conversion and text manipulation scripts. It is expandable by writing new scripts in either Python, XSL, Perl or directly in Java. The [https://it-dev.mpiwg-berlin.mpg.de/svn/digitizing-tools source code] is available and there are also [https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-content/browser/digitizing-tools/docs detailed instructions] for building and using the tool. [[Image(01_workflowTools.png, 40%, title="XML Workflow tools entry page", alt="Entry page")]] [http://ocropus2.rz-berlin.mpg.de:8080/digitizing-tools/pages/home.iface XML workflow tools] Input for a typical workflow is a transcription that was created following the [wiki:despecs Data Entry Specifications]. The work is divided into three phases: checking, creating a well-formed XML and creating valid XML, all of which are described below in detail. == Phase 1: Checking == [[Image(02_checkTags.png, 40%, title="02_checkTags.png", alt="02_checkTags.png")]] The text document is uploaded via the webpage and the scripts are generally started by clicking on the "Run" buttoon. [[Image(03_checkTagsOutput.png, 40%, title="03_checkTagsOutput.png", alt="03_checkTagsOutput.png")]] If there are errors, these are displayed in the "error" tab, other information is shown in the "console" tab [[Image(04_modificationInEditor.png, 40%, title="04_modificationInEditor.png", alt="04_modificationInEditor.png")]] Because of errors being present in the input file, the document has to be modified locally using a text editor. [[Image(05_reCheckTags.png, 40%, title="05_reCheckTags.png", alt="05_reCheckTags.png")]] After re-running the script, the text has passed the test and the next steps can be taken. [[Image(06_nextWorkflowStep.png, 40%, title="06_nextWorkflowStep.png", alt="06_nextWorkflowStep.png")]] Below the output of the current script is a window which suggests the next meaningful script in the workflow. The output of the current script is used as input to the next one. Of course, other scripts can be selected, as well. [[Image(07_findPagebreaks.png, 40%, title="07_findPagebreaks.png", alt="07_findPagebreaks.png")]] Checking the pagebreaks is important for synchronizing the digital facsimiles with the transcription. [[Image(08_pagebreaksChecker.png, 40%, title="08_pagebreaksChecker.png", alt="08_pagebreaksChecker.png")]] [[Image(09_pagebreakCheckerMore.png, 40%, title="09_pagebreakCheckerMore.png", alt="09_pagebreakCheckerMore.png")]] The webservice displays the pages with the first few lines of the content. The user now checks manually if the text corresponds to what is seen on the digital facsimile. Links are provided for comfortable checking. [[Image(10_outputs.png, 40%, title="10_outputs.png", alt="10_outputs.png")]] In this case, the script is divided into two parts, the first part creating an configuration file which can be altered by the user (shown below). This is then evaluated in the second step. [[Image(11_pbConfigurationFile.png, 20%, title="11_pbConfigurationFile.png", alt="11_pbConfigurationFile.png")]] The configuration file for the pagebreak script. The last entry should be removed. There is no corresponding pagebreak for that image in the transcription. [[Image(12_showDiff.png, 40%, title="12_showDiff.png", alt="12_showDiff.png")]] A useful feature is to show the effects of one script by displaying the current and the previous version side by side: the Diff. [[Image(13_DiffTool.png, 40%, title="13_DiffTool.png", alt="13_DiffTool.png")]] The Diff tool showing the beginning of the text document after application of the pagebreak script. Green lines have been altered: the filename has been written behind each pagebreak-pseudo-tag (pseudo, because this is not really XML yet). [[Image(14_unknownCharacterWarning.png, 40%, title="14_unknownCharacterWarning.png", alt="14_unknownCharacterWarning.png")]] Another preparational step is the treatment of unknown characters. Characters that were not recognized during data entry assigned a code and collected on a list together with a screenshot of that character. [[Image(15_unknownCharacterFile.png, 30%, title="15_unknownCharacterFile.png", alt="15_unknownCharacterFile.png")]] A configuration file takes care of these replacements with its corresponding Unicode character. This file is evaluated in the next step and the replacements take place. [[Image(16_unknownCharacterOutput.png, 40%, title="16_unknownCharacterOutput.png", alt="16_unknownCharacterOutput.png")]] == Phase 2: Creating well-formed XML == Following these important preparational steps is the conversion to a well-formed XML document. These are additional replacements and the resolving of shorthands that were used during data entry. [[Image(18_helpText.png, 40%, title="18_helpText.png", alt="18_helpText.png")]] The built-in help describes the functionality of each script. [[Image(19_stringInputForXML.png, 40%, title="19_stringInputForXML.png", alt="19_stringInputForXML.png")]] One of the final steps is the insertion of metadata that reside already in the system. For that reason, the identifier of the document has to be put in at this point. [[Image(20_wellformedXML.png, 40%, title="20_wellformedXML.png", alt="20_wellformedXML.png")]] The first lines of the XML, displayed in the browser. [[Image(21_testWellformedness.png, 40%, title="21_testWellformedness.png", alt="21_testWellformedness.png")]] [[Image(22_XMLWellformed.png, 40%, title="22_XMLWellformed.png", alt="22_XMLWellformed.png")]] A script checks the XML if it is well-formed. == Phase 3: Creating valid XML == Although the XML document being well-formed does not mean that it is also valid to an XML schema. There are still a few steps to be taken. This is done in the third phase. [[Image(23_moveFloatsDiff.png, 40%, title="23_moveFloatsDiff.png", alt="23_moveFloatsDiff.png")]] Floating elements like notes and images are moved away from their original places, being replaced by an anchor. The diff shows the effect of this. [[Image(25_divStructure.png, 40%, title="25_divStructure.png", alt="25_divStructure.png")]] Lateron, a div structure is added which is also used for creating a table of contents. [[Image(27_XMLValid.png, 40%, title="27_XMLValid.png", alt="27_XMLValid.png")]] As a final stage, the validity is tested against a schema. In this case, the document is valid. In some cases, the document has to be edited locally to stand this test. == Extras == [[Image(28_whatshallwedonow.png, 40%, title="28_whatshallwedonow.png", alt="28_whatshallwedonow.png")]] Further extras can be applied to the XML document, available in the bottom window. For example, mathematical formulas written as LaTeX can be converted to MathML here. == Upload == [[Image(29_uploadSandbox.png, 40%, title="29_uploadSandbox.png", alt="29_uploadSandbox.png")]] A valid XML file can then be uploaded in the Sandbox for further checking. [[Image(30_indexmeta.png, 40%, title="30_indexmeta.png", alt="30_indexmeta.png")]] In addition to that, the file containing the metadata of the work has to be expanded with the path and name of the XML document so that it is also [http://echo.mpiwg-berlin.mpg.de/ECHOdocuView?url=/permanent/library/UR271U6Y/ displayed in the ECHO display environment]. [[Image(31_operationStatus.png, 40%, title="31_operationStatus.png", alt="31_operationStatus.png")]] Operation status shows that the text has successfully been uploaded. During that process, the text is also analysed morphologically and connected to various dictionaries available in the system. == Online representations == [[Image(32_resultPollux.png, 40%, title="32_resultPollux.png", alt="32_resultPollux.png")]] [http://mpdl-system.mpiwg-berlin.mpg.de:30060/mpdl/page-query-result.xql?document=%2Fecho%2Fit%2FZonca_1656_UR271U6Y.xml&mode=textPollux&pn=20&query-type=&query=&query-result-pn=0 The text being displayed in the sandbox], maroon-coloured words can be clicked on, showing appropriate dictionary entries. [[Image(33_wordInfo.png, 40%, title="33_wordInfo.png", alt="33_wordInfo.png")]] [http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?query=legnami&queryDisplay=legnami&language=it&outputFormat=html&outputType=morphCompact&outputType=dictFull Word information] = DM2E Mapping Server = The DM2E project considered the use of MINT for the RDFization of data. MINT is based on XSL Transformation. Due to the specific characteristics of our data (index.meta), we cannot use this tool. For this reason, Jorge Urzua developed a web server that is able to transform index.meta into general RDF and into EDM. [[Image(34_mappingServer.png, 40%, title="34_mappingServer", alt="34_mappingServer")]] Using the [https://openmind-ismi-dev.mpiwg-berlin.mpg.de/indexmeta-rdf/ DM2E Mapping Server], the metadata information is converted various RDF models, for example the [http://dm2e.eu/open-workflows/#DM2EDataModel DM2E Data Model]. With the data present in this format, the various RDF-aware tools available in the [http://dm2e.eu/open-workflows/ DM2E toolchain] can be used and the data finally ingested into the [http://data.dm2e.eu/ DM2E triple store] [[Image(35_resultPubby.png, 40%, title="35_resultPubby.png", alt="35_resultPubby.png")]] [http://data.dm2e.eu/data/html/resourcemap/mpiwg/rara/MPIWG_UK75HAUV/20141001101216473 After ingestion into the DM2E triple store], the results can be easily browsed [[Image(36_resultEuropeana.png, 40%, title="36_resultEuropeana.png", alt="36_resultEuropeana.png")]] Of course, the source has also been given to [http://europeana.eu/portal/record/2048607/data_item_mpiwg_rara_MPIWG_UK75HAUV.html Europeana] = Text enrichment Tools = [=#textEnrichment Different tools for enriching text have been developed in order to integrate them in to DM2E services.] == Lemmatisation == This section addresses the integration of the MPIWG Lemmatisation in Pundit. A lemma is the canonical form of a set of words. Lemmatisation refers to the morphological analysis of words that aims to find the lemma of a word by removing inflectional endings and returning the base or dictionary form of a word. == MPIWG Lemmatisator == The MPIWG Lemmatisator is a web service that is part of the Language technology services (Mpdl) that is hosted in [http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/]. This web service is not responsible for the lemmatisation of words, however it accesses several other web services (like: http://www.perseus.tufts.edu/hopper/) that have dictionaries of words and their lemmas. The MPIWG Lemmatisator is only responsible for the words query and for the merging of the responses from the other services in a unique response. The lemmatisator supports the following languages: Arabic, Chinese, Dutch, English, French, German, Ancient Greek, Italian and Latin. As example, the following link illustrates the response of the lemmatisation for the query “multa”: [http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetLemmas?query=multa&language=lat&outputFormat=html] == Pundit Integration == Pundit is an annotation tool based on semantic web technologies. In order to allow the use of the Mpdl in Pundit, the lemmatisator should be able to transform its response to RDF. The Web Service (hosted temporally in [https://openmind-ismi-dev.mpiwg-berlin.mpg.de/lemmatisator]) attempts to solve this issue by the transformation of the response from the MPIWG Lemmatisator to RDF Triples. The triples returned by this service implement the Gold Ontology (see: [http://lov.okfn.org/dataset/lov/vocabs/gold]). For example, the query the word “mula” in Latin returns: “mula is lemma of multus”. Using the Gold Ontology, the last triple would be expressed as follow: http://mpiwg.de/ontologies/ont.owl/lemma#multus writtenRealization http://mpiwg.de/ontologies/ont.owl/word#multa