view software/eXist/webapp/mpdl/info.xql @ 17:7e883ce72fec

diverse Fehlerbehebungen
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 27 Sep 2011 16:41:15 +0200
parents 469d927b9ca7
children
line wrap: on
line source

xquery version "1.0";

declare namespace request="http://exist-db.org/xquery/request";

let $info := request:get-parameter("info", "")  (: default: no info  :)

let $infoTitle :=
  if ($info = '')
  then ()
  else if ($info = 'mpdl')
  then 'MPDL prototype'
  else if ($info = 'docBases')
  then 'MPDL documents'
  else if ($info = 'fulltextMorph')
  then 'Morphological search'
  else if ($info = 'fulltext')
  then 'Fulltext search'
  else if ($info = 'xpath')
  then 'Xpath'
  else if ($info = 'xquery')
  then 'XQuery'
  else if ($info = 'pollux')
  then 'MPDL Pollux service.'
  else if ($info = 'wordInfo')
  then 'MPDL language technology: Word information.'
  else ()

let $infoText := 
  if ($info = '')
  then ()
  else if ($info = 'mpdl')
  then ('The prototype is based on eXist/Lucene technology. It is implemented in XQuery/XPath, XSL and Java. Also eXist itself is extended a little. All software is open source under the LGPL license ', <img src="images/copyleft.png" width="15" height="15" border="0" alt="lgpl"/>, <p/>, 'The MPDL project is funded by the ', <a href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the History of Science</a>, '.', <p/>, 'More information about the MPDL project could be found ', <a href="https://itgroup.mpiwg-berlin.mpg.de:8080/tracs/mpdl-project-software">here</a>, '.', <p/>, 'And that is the guy who is the developer of that stuff: ', <p align="middle"><a href="http://josef-willenborg.de"><img valign="middle" src="images/pirate-joey.gif" width="100" height="100" border="0" alt="pirate"/></a></p>)
  else if ($info = 'malcolm')
  then (<h2><img alt="Malcolm Hyman" align="right" src="images/malcolm.jpg" width="30%" height="30%"/>Dr. Malcolm Hyman<br/> † September 4, 2009</h2>, <h3>In memoriam</h3>, 'This software is dedicated to Malcolm Hyman, who was the founder and leader of this project. He died suddenly and unexpectedly. This project owes everything to him.', <h3>His homepages</h3>, <ul><li><a href="http://archimedes.fas.harvard.edu/mdh">Harvard University, Department of the Classics</a></li><li><a href="http://www.mpiwg-berlin.mpg.de/en/staff/members/hyman">Max Planck Institute for the History of Science</a></li><li><a href="http://www.harvardscience.harvard.edu/directory/researchers/malcolm-hyman">HarvardScience</a></li></ul>)
  else if ($info = 'docBases')
  then (<b>Archimedes DTD (until 2008): </b>, 'more than 120 documents (4KB - 18MB), coming from Echo collections &quot;Archimedes&quot; and &quot;Historical Travel Guides&quot;, languages: latin, italian, english, german, french, dutch, greek, arabic, chinese', <br/>, <br/>, <b>Echo Schema (since 2009): </b>, 'planned more than 100 documents in different languages', <br/>, <br/>, <b>TEI Schema (since 2011): </b>, 'different languages, mainly by external document providers', <br/>, <br/>, <b>Diverse (since 2011): </b>, 'different languages, no schema prerequesites, mainly HTML documents')
  else if ($info = 'attr')
  then ('Attribute search is case sensitive.', <p/>, 'Query syntax see: ', <a href="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html">Lucene query syntax</a>, '.')
  else if ($info = 'fulltextMorph')
  then ('Morphological index is built up by ', <a href="http://archimedes.fas.harvard.edu/cgi-bin/donatus">Donatus</a>, ' and ', <a href="http://snowball.tartarus.org/">Snowball</a>, '. It is case insensitive.', <p/>, 'Query syntax see: ', <a href="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html">Lucene query syntax</a>, '.')
  else if ($info = 'fulltext')
  then ('Fulltext index is a case sensitive word index. It should be used especially for wildcard searching (with * and ?).', <p/>, 'Query syntax see: ', <a href="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html">Lucene query syntax</a>, '.')
  else if ($info = 'xpath')
  then (<p>XPath queries are executed against its context (a path relative to the context). The context is the document from which the XPath query is executed.</p>, <p>Example: /archimedes/info/author finds only the author of the document from which the query is executed (and not of all documents). XPath queries are namespace aware.</p>, <p>References: XPath Language 2.0, see: <a href="http://www.w3.org/TR/xpath20/">here</a>.</p>)
  else if ($info = 'xquery')
  then (<p>XQueries are executed against its context (a path relative to the context). The context is the document from which the XQuery is executed. XQueries are namespace aware.</p>, <p>Example 1: return all echo:metadata entries of current document<br/>let $result := //echo:metadata/*<br/>return $result<br/></p>, <p>Example 2: count words of first 3 sentences of current document:<br/>let $s := //echo:s<br/>let $first3s := $s[position() &lt; 4]<br/>let $first3Str := string-join($first3s, ' ')<br/>let $wordCounter := count(tokenize($first3Str, '\W+')[. != ''])<br/>return $wordCounter<br/></p>, <p>If you want to query over many documents you could do this for example by specifying the document collection and using an XPath expression relative from this collection: </p>, <p>Example 3 (XQuery over all documents): return all authors of all archimedes documents ordered<br/>let $coll := collection('/db/mpdl/documents/standard/archimedes')<br/>let $result := $coll/archimedes/info/author<br/>let $orderedResult := <br/>&#160;&#160;for $elem in $result<br/>&#160;&#160;order by $elem<br/>&#160;&#160;return $elem<br/>return $orderedResult<br/></p>, <p>References: XQuery  Language 1.0, see <a href="http://www.w3.org/TR/xquery/">here</a>, <a href="http://de.wikipedia.org/wiki/XQuery">Wikipedia article</a>, eXist functions, see <a href="http://demo.exist-db.org/xquery/transform.xql">here</a></p>)
  else if ($info = 'pollux')
  then (<p>MPDL <a href="http://archimedes.fas.harvard.edu/pollux">Pollux</a> service.</p>, <p>Following dictionaries are supported</p>, <ul><li>Autenrieth, a Homeric lexicon (10158 entries)</li><li>Baretti, a dictionary of the English and Italian languages (53555 entries)</li><li>Bonitz, index Aristotelicus (14648 entries)</li><li>Cooper, Thesaurus Linguae Romanae et Brittanicae (33124 entries)</li><li>Florio, a worlde of wordes, or most copious, dictionarie in Italian and English (70091 entries)</li><li>Lewis and Short, Latin dictionary (53500 entries)</li><li>Liddell-Scott-Jones, a Greek-English lexicon (112631 entries)</li><li>Salmoné, an advanced learner's Arabic-English dictionary (6360 entries)</li><li>Webster's revised unabridged dictionary - 1913 (111733 entries)</li></ul>)
  else if ($info = 'wordInfo')
  then (<p><b>Morphology information</b>: MPDL <a href="http://archimedes.fas.harvard.edu/cgi-bin/donatus">Donatus</a>.</p>, <p>Following morphological data is used and provided</p>, <ul><li>Perseus<ul><li>arabic: 97.249 forms</li><li>greek: 1.020.846 forms</li><li>latin: 710.620 forms</li></ul></li><li>Celex<ul><li>dutch: 381.275 forms and 124.136 lemmas</li><li>english: 160.595 forms and 52.447 lemmas</li><li>german: 365.530 forms and 51.728 lemmas</li></ul></li><li>Lexique<ul><li>french: 306.795 forms</li></ul></li></ul>, <p><b>Dictionary information:</b> MPDL <a href="http://archimedes.fas.harvard.edu/pollux">Pollux</a></p>, <p>Following internal dictionaries are provided</p>, <ul><li>Autenrieth, a Homeric lexicon (10158 entries)</li><li>Baretti, a dictionary of the English and Italian languages (53555 entries)</li><li>Bonitz, index Aristotelicus (14648 entries)</li><li>Cooper, Thesaurus Linguae Romanae et Brittanicae (33124 entries)</li><li>Florio, a worlde of wordes, or most copious, dictionarie in Italian and English (70091 entries)</li><li>Lewis and Short, Latin dictionary (53500 entries)</li><li>Liddell-Scott-Jones, a Greek-English lexicon (112631 entries)</li><li>Salmoné, an advanced learner's Arabic-English dictionary (6360 entries)</li><li>Webster's revised unabridged dictionary - 1913 (111733 entries)</li></ul>, <p>Following external dictionaries are provided</p>, <ul><li>Deutsches Wörterbuch der deutschen Sprache</li><li>William J. Slater, Lexicon to Pindar</li><li>The ARTFL project: Dictionnaires d'autrefois: French dictionaries of the 17th, 18th, 19th and 20th centuries</li><li>The ARTFL project: French - English dictionary</li><li>Charlton T. Lewis, an Elementary Latin Dictionary</li><li>Wiktionary: WikiWoordenboek</li><li>Lin Yutan: humanum.arts.cuhk.edu.hk/cgi-bin/agrep-lindict</li><li>Chinese Wiktionary: en.wiktionary.org/wiki</li><li>Chinese Text Project: ctext.org/dictionary.pl</li><li>Unicode: www.unicode.org/cgi-bin/GetUnihanData.pl</li></ul>, <p><b>Wikipedia information:</b> MPDL Wiki (optional by URL parameter: type=all)</p>, <p>Links to following Wikipedia servers are provided</p>, <ul><li>ar.wikipedia.org</li><li>de.wikipedia.org</li><li>el.wikipedia.org</li><li>en.wikipedia.org</li><li>fr.wikipedia.org</li><li>it.wikipedia.org</li><li>la.wikipedia.org</li><li>nl.wikipedia.org</li><li>zh.wikipedia.org</li></ul>, <p><b>Place information</b></p>, <p>Place links in Echo texts. </p>)
  else if ($info = 'donatus')
  then (<p>MPDL <a href="http://archimedes.fas.harvard.edu/cgi-bin/donatus">Donatus</a> and <a href="http://snowball.tartarus.org/">Snowball</a> service.</p>, <p>At this time following morphological data is used and provided</p>, <ul><li>Perseus<ul><li>arabic: 97.249 forms</li><li>greek: 1.020.846 forms</li><li>latin: 710.620 forms</li></ul></li><li>Celex<ul><li>dutch: 381.275 forms and 124.136 lemmas</li><li>english: 160.595 forms and 52.447 lemmas</li><li>german: 365.530 forms and 51.728 lemmas</li></ul></li><li>Lexique<ul><li>french: 306.795 forms</li></ul></li></ul>)
  else if ($info = 'docInterfaceOperation')
  then (<p><b>MPDL document interface: Operation</b><br/> Please do not overload the system by executing too many document operations at the same time. Please finish one document operation after the other. Look into the status of your document operation (each one has a job id) and see if it is finished (job status finished has a time stamp). Then start another operation.</p>)
  else if ($info = 'docInterfaceSource')
  then (<p><b>MPDL document interface: Source document</b><br/> The source document has to be a valid XML-document against either the <a href="http://mpdl-proto.mpiwg-berlin.mpg.de/exist/rest/db/mpdl/schema/echo/echo.rnc">Echo Schema</a> or against the <a href="http://mpdl-proto.mpiwg-berlin.mpg.de/exist/rest/db/mpdl/schema/tei/teilite.rnc">TEI Lite schema</a> or against the Archimedes document format</p>)
  else if ($info = 'docInterfaceDestDocName')
  then (<p><b>MPDL document interface: Destination document name</b> <ul><li>has to be unique within a document base and a language. If you use a name which is already used - please look in the documents list (on the right side) - it will be updated (not created).</li> <li>always needs the extension &quot;.xml&quot;.</li><li>example: &quot;Benedetti_1585.xml&quot;</li></ul></p>)
  else ()


return
<html>
<head>
<title>MPDL info</title>
</head>
<body>
<table>
  <tr>
    <td>
    <img src="images/info.png" width="20" height="20" border="0" alt="Info MPDL"/>
    <span>&#160;&#160;&#160;&#160;&#160;</span>
    <text style="font-weight:bold;font-size:30px">{$infoTitle}</text>
    </td>
  </tr>
  <tr>
    <td>{$infoText}</td>
  </tr>
</table>
</body>
</html>