GramWord: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
sister projects
imported>Gfis
/dict
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:


Several decision algorithms use these tables to determine the grammatical type of all words in a text. In the HTML output, the recognized words are shown in different colors.
Several decision algorithms use these tables to determine the grammatical type of all words in a text. In the HTML output, the recognized words are shown in different colors.
 
<!--
GramWord uses the following sister projects on [[Main Page|teherba.org]]:
GramWord uses the following sister projects on [[Main Page|teherba.org]]:
* [[Common]]
* [[Common]]
Line 10: Line 10:
* [[NumWord]] for number words, months and weekdays and
* [[NumWord]] for number words, months and weekdays and
* [[Xtrans]] for XML filtering.
* [[Xtrans]] for XML filtering.
 
-->
===Short Example===
===Short Example===
A sentence from &quot;Don Quijote&quot;:
A sentence from &quot;Don Quijote&quot; (hold the mouse over a colored word to see the type of the morphem):
<blockquote>Zuletzt, da es mit seinem Verstand völlig zu Ende gegangen, verfiel er auf den seltsamsten Gedanken, auf den jemals in der Welt ein Narr verfallen; nämlich es deuchte ihm angemessen und notwendig, sowohl zur Mehrung seiner Ehre als auch zum Dienste des Gemeinwesens, sich zum fahrenden Ritter zu machen und durch die ganze Welt mit Roß und Waffen zu ziehen, um Abenteuer zu suchen und all das zu üben, was, wie er gelesen, die fahrenden Ritter übten, das heißt jegliche Art von Unbill wiedergutzumachen und sich in Gelegenheiten und Gefahren zu begeben, durch deren Überwindung er ewigen Namen und Ruhm gewinnen würde.</blockquote>
<blockquote><span style="color:red;background:yellow" title="">Nachdem</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:black;background:lightblue" title="Qant">alle</span> <span style="color:black;background:lightblue" title="Qant">diese</span> <span style="color:black;background:pink" title="Pl">Vorkehrungen</span> <span style="color:yellow;background:blue" title="SPa0">getroffen</span>, <span style="color:yellow;background:blue" title="SIp11">wollte</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:white;background:gray" title="">nicht</span> <span style="color:black;background:lightblue" title="Cmpr">l&#xe4;nger</span> <span style="color:yellow;background:blue" title="SIn0">warten</span>, <span style="color:yellow;background:blue" title="SIn0">sein</span> <span style="color:yellow;background:blue" title="RtWeak">Vorhaben</span> <span style="color:red;background:yellow" title="Shor">ins</span> <span style="color:black;background:pink" title="SgNt">Werk</span> <span style="color:red;background:yellow" title="Prim">zu</span> <span style="color:yellow;background:blue" title="RtWeak">setzen</span>; <span style="color:white;background:crimson" title="SgPersNomvNt3">es</span> dr&#xe4;ngte <span style="color:white;background:crimson" title="SgPersAccv3Ms">ihn</span> <span style="color:black;background:red" title="">dazu</span> <span style="color:white;background:green" title="DetmNomvSgMs">der</span> <span style="color:black;background:pink" title="SgMs">Gedanke</span> <span style="color:red;background:yellow" title="Prim">an</span> <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:black;background:pink" title="SgFm">Entbehrung</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:black;background:pink" title="SgFm">Welt</span> <span style="color:red;background:yellow" title="">durch</span> <span style="color:yellow;background:blue" title="SIn0">sein</span> <span style="color:yellow;background:blue" title="RtWeak">Z&#xf6;gern</span> <span style="color:yellow;background:blue" title="SCs13">erleide</span>, derart <span style="color:yellow;background:blue" title="SIp91">waren</span> <span style="color:white;background:green" title="DetmNomvSgFm">die</span> Unbilden, <span style="color:white;background:crimson" title="Relt">denen</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:red;background:yellow" title="Prim">zu</span> <span style="color:yellow;background:blue" title="RtWeak">steuern</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:black;background:pink" title="Pl">Ungerechtigkeiten</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:yellow;background:blue" title="SCs93">zurechtzubringen</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> Ungeb&#xfc;hr, <span style="color:white;background:green" title="DetmNomvSgMs">der</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:yellow;background:blue" title="SCs93">abzuhelfen</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> Mi&#xdf;br&#xe4;uche, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> wiedergutzumachen, <span style="color:black;background:lightblue" title="Root">kurz</span>, <span style="color:white;background:green" title="DetmNomvSgFm">die</span> <span style="color:black;background:pink" title="Pl">Pflichten</span>, <span style="color:white;background:crimson" title="Relt">denen</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:red;background:yellow" title="Prim">zu</span> <span style="color:yellow;background:blue" title="RtWeak">gen&#xfc;gen</span> <span style="color:yellow;background:blue" title="SIp13">gedachte</span>. <span style="color:blue;background:yellow" title="">Und</span> <span style="color:white;background:gray" title="">so</span>, <span style="color:white;background:gray" title="">ohne</span>
 
irgendeinem <span style="color:red;background:yellow" title="Prim">von</span> <span style="color:white;background:crimson" title="SgPersGenv3Ms">seiner</span> Absicht <span style="color:black;background:pink" title="SgFm">Kunde</span> <span style="color:red;background:yellow" title="Prim">zu</span> <span style="color:yellow;background:blue" title="SIn0">geben</span> <span style="color:blue;background:yellow" title="">und</span> <span style="color:white;background:gray" title="">ohne</span> <span style="color:blue;background:yellow" title="">da&#xdf;</span> <span style="color:white;background:crimson" title="UndtNomv">jemand</span> <span style="color:white;background:crimson" title="SgPersAccv3Ms">ihn</span> <span style="color:yellow;background:blue" title="SIp11">sah</span>, bewehrte <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:white;background:crimson" title="ReflSg3">sich</span> <span style="color:white;background:green" title="UndtGenvSgMs">eines</span> <span style="color:blue;background:chartreuse" title="PersSurn">Morgens</span> <span style="color:red;background:yellow" title="Prim">vor</span> Anbruch <span style="color:white;background:green" title="DetmGenvSgMs">des</span> <span style="color:black;background:pink" title="SgGe">Tages</span> - <span style="color:white;background:crimson" title="SgPersNomvNt3">es</span> <span style="color:yellow;background:blue" title="SIp11">war</span> <span style="color:white;background:green" title="UndtGenvSgFm">einer</span> <span style="color:white;background:green" title="DetmNomvSgMs">der</span> <span style="color:yellow;background:blue" title="SIn0">hei&#xdf;en</span> Julitage - <span style="color:red;background:yellow" title="Prim">mit</span> <span style="color:white;background:crimson" title="SgPersGenv3Ms">seiner</span> <span style="color:black;background:lightblue" title="Qant">ganzen</span> <span style="color:black;background:pink" title="SgFm">R&#xfc;stung</span>, <span style="color:yellow;background:blue" title="SIp11">stieg</span> <span style="color:red;background:yellow" title="Prim">auf</span> <span style="color:white;background:green" title="DetmDatvPl">den</span> <span style="color:blue;background:chartreuse" title="FmZool">Rosinante</span>, <span style="color:red;background:yellow" title="">nachdem</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:white;background:crimson" title="SgPossDatvPl3">seinen</span>
Resulting HTML output:
zusammengeflickten Turnierhelm aufgesetzt, fa&#xdf;te <span style="color:white;background:crimson" title="SgPossNomvFm3">seine</span> <span style="color:black;background:pink" title="SgFm">Tartsche</span>
 
<span style="color:red;background:yellow" title="Prim">in</span> <span style="color:white;background:green" title="DetmDatvPl">den</span> <span style="color:black;background:pink" title="SgMsBody">Arm</span>, <span style="color:yellow;background:blue" title="SIp11">nahm</span> <span style="color:white;background:crimson" title="SgPossDatvPl3">seinen</span> <span style="color:black;background:pink" title="SgMs">Speer</span> <span style="color:blue;background:yellow" title="">und</span> <span style="color:yellow;background:blue" title="SIp11">zog</span> <span style="color:red;background:yellow" title="">durch</span> <span style="color:white;background:green" title="DetmNomvSgFm">die</span> Hinterpforte <span style="color:white;background:crimson" title="SgPossGenvMs3">seines</span> <span style="color:black;background:pink" title="SgGe">Hofes</span> <span style="color:red;background:yellow" title="">hinaus</span> <span style="color:red;background:yellow" title="Shor">aufs</span> <span style="color:black;background:pink" title="SgNt">Feld</span>, <span style="color:red;background:yellow" title="Prim">mit</span> <span style="color:black;background:lightblue" title="XC">gewaltiger</span> <span style="color:black;background:pink" title="SgFm">Befriedigung</span> <span style="color:blue;background:yellow" title="">und</span> Herzensfreude <span style="color:black;background:red" title="ModlAnct">darob</span>, <span style="color:red;background:yellow" title="Prim">mit</span> <span style="color:green;background:yellow" title="Prim">wie</span> <span style="color:blue;background:chartreuse" title="PersSurn">gro&#xdf;er</span> <span style="color:black;background:pink" title="SgFm">Leichtigkeit</span> <span style="color:white;background:crimson" title="SgPersNomvMs3">er</span> <span style="color:yellow;background:blue" title="SIn0">sein</span> <span style="color:black;background:lightblue" title="XP">l&#xf6;bliches</span> <span style="color:yellow;background:blue" title="RtWeak">Vorhaben</span> <span style="color:yellow;background:blue" title="SCt93">auszuf&#xfc;hren</span> <span style="color:yellow;background:blue" title="SPa0">begonnen</span>.
<tt>
</blockquote>
<nowiki>
<span class="Pr" morph="">Nachdem</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Aj" morph="Qant">alle</span> <span class="Aj" morph="Qant">diese</span> <span class="Sb" morph="Pl">Vorkehrungen</span> <span class="Vb" morph="SPa0">getroffen</span>, <span class="Vb" morph="SIp11">wollte</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Un" morph="">nicht</span>
<span class="Aj" morph="Cmpr">länger</span> <span class="Vb" morph="SIn0">warten</span>, <span class="Vb" morph="SIn0">sein</span> <span class="Vb" morph="RtWeak">Vorhaben</span> <span class="Pr" morph="Shor">ins</span> <span class="Sb" morph="SgNt">Werk</span> <span class="Pr" morph="Prim">zu</span> <span class="Vb" morph="RtWeak">setzen</span>; <span class="Pn" morph="SgPersNomvNt3">es</span> <span class="Vb" morph="Pa1F">drängte</span> <span class="Pn" morph="SgPersAccv3Ms">ihn</span>
<span class="Av" morph="">dazu</span> <span class="Ar" morph="DetmNomvSgMs">der</span> <span class="Sb" morph="SgMs">Gedanke</span> <span class="Pr" morph="Prim">an</span> <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Sb" morph="SgFm">Entbehrung</span>, <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Sb" morph="SgFm">Welt</span> <span class="Pr" morph="">durch</span> <span class="Vb" morph="SIn0">sein</span>
<span class="Vb" morph="RtWeak">Zögern</span> <span class="Vb" morph="Pr11">erleide</span>, derart <span class="Vb" morph="SIp91">waren</span> <span class="Ar" morph="DetmNomvSgFm">die</span> Unbilden, <span class="Pn" morph="Relt">denen</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Pr" morph="Prim">zu</span> <span class="Vb" morph="RtWeak">steuern</span>,
<span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Sb" morph="Pl">Ungerechtigkeiten</span>, <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Vb" morph="SCs93">zurechtzubringen</span>, <span class="Ar" morph="DetmNomvSgFm">die</span> Ungebühr,
<span class="Ar" morph="DetmNomvSgMs">der</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Vb" morph="SCs93">abzuhelfen</span>, <span class="Ar" morph="DetmNomvSgFm">die</span> Mißbräuche, <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Pn" morph="SgPersNomvMs3">er</span> wiedergutzumachen,
<span class="Aj" morph="Root">kurz</span>, <span class="Ar" morph="DetmNomvSgFm">die</span> <span class="Sb" morph="Pl">Pflichten</span>, <span class="Pn" morph="Relt">denen</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Pr" morph="Prim">zu</span> <span class="Vb" morph="RtWeak">genügen</span> <span class="Vb" morph="SIp13">gedachte</span>. <span class="Cj" morph="">Und</span> <span class="Un" morph="">so</span>, <span class="Un" morph="">ohne</span>
irgendeinem <span class="Pr" morph="Prim">von</span> <span class="Pn" morph="SgPersGenv3Ms">seiner</span> Absicht <span class="Sb" morph="SgFm">Kunde</span> <span class="Pr" morph="Prim">zu</span> <span class="Vb" morph="SIn0">geben</span> <span class="Cj" morph="">und</span> <span class="Un" morph="">ohne</span> <span class="Cj" morph="">daß</span>
<span class="Pn" morph="UndtNomv">jemand</span> <span class="Pn" morph="SgPersAccv3Ms">ihn</span> <span class="Vb" morph="SIp11">sah</span>, <span class="Vb" morph="Pa1F">bewehrte</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Pn" morph="ReflSg3">sich</span> <span class="Ar" morph="UndtGenvSgMs">eines</span> <span class="Av" morph="Time">Morgens</span> <span class="Pr" morph="Prim">vor</span> Anbruch <span class="Ar" morph="DetmGenvSgMs">des</span>
<span class="Sb" morph="SgGe">Tages</span> - <span class="Pn" morph="SgPersNomvNt3">es</span> <span class="Vb" morph="SIp11">war</span> <span class="Ar" morph="UndtGenvSgFm">einer</span> <span class="Ar" morph="DetmNomvSgMs">der</span> <span class="Vb" morph="SIn0">heißen</span> Julitage - <span class="Pr" morph="Prim">mit</span> <span class="Pn" morph="SgPersGenv3Ms">seiner</span> <span class="Aj" morph="Qant">ganzen</span>
<span class="Sb" morph="SgFm">Rüstung</span>, <span class="Vb" morph="SIp11">stieg</span> <span class="Pr" morph="Prim">auf</span> <span class="Ar" morph="DetmDatvPl">den</span> <span class="Nm" morph="FmZool">Rosinante</span>, <span class="Pr" morph="">nachdem</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Pn" morph="SgPossDatvPl3">seinen</span>
<span class="Vb" morph="Pa1A">zusammengeflickten</span> Turnierhelm <span class="Vb" morph="Im92">aufgesetzt</span>, <span class="Vb" morph="Pa1F">faßte</span> <span class="Pn" morph="SgPossNomvFm3">seine</span> <span class="Sb" morph="SgFm">Tartsche</span>
<span class="Pr" morph="Prim">in</span> <span class="Ar" morph="DetmDatvPl">den</span> <span class="Sb" morph="SgMsBody">Arm</span>, <span class="Vb" morph="SIp11">nahm</span> <span class="Pn" morph="SgPossDatvPl3">seinen</span> <span class="Sb" morph="SgMs">Speer</span> <span class="Cj" morph="">und</span> <span class="Vb" morph="SIp11">zog</span> <span class="Pr" morph="">durch</span> <span class="Ar" morph="DetmNomvSgFm">die</span> Hinterpforte
<span class="Pn" morph="SgPossGenvMs3">seines</span> <span class="Sb" morph="SgGe">Hofes</span> <span class="Pr" morph="">hinaus</span> <span class="Pr" morph="Shor">aufs</span> <span class="Sb" morph="SgNt">Feld</span>, <span class="Pr" morph="Prim">mit</span> <span class="Aj" morph="XC">gewaltiger</span> <span class="Sb" morph="SgFm">Befriedigung</span> <span class="Cj" morph="">und</span>
Herzensfreude <span class="Av" morph="ModlAnct">darob</span>, <span class="Pr" morph="Prim">mit</span> <span class="Ir" morph="Prim">wie</span> <span class="Aj" morph="XC">großer</span> <span class="Sb" morph="SgFm">Leichtigkeit</span> <span class="Pn" morph="SgPersNomvMs3">er</span> <span class="Vb" morph="SIn0">sein</span>
<span class="Aj" morph="XP">löbliches</span> <span class="Vb" morph="RtWeak">Vorhaben</span> <span class="Vb" morph="SCt93">auszuführen</span> <span class="Vb" morph="SPa0">begonnen</span>.
</nowiki>
</tt>


'''[[GramWord/tempx|Longer Example]]''' (Chapters 1 - 4 from &quot;Don Quijote&quot;)<br />
'''[[GramWord/tempx|Longer Example]]''' (Chapters 1 - 4 from &quot;Don Quijote&quot;)<br />
'''[[GramWord/docs/api/index|API documentation]]''' (Javadoc)<br />
'''[[GramWord/docs/coding|Coding of Syntactic and Semantic Attributes of Words]]'''<br />
'''[[GramWord/docs/coding|Coding of Syntactic and Semantic Attributes of Words]]'''<br />
'''[[GramWord/docs/decisions|Decision Algorithms]]'''<br />
'''[[GramWord/docs/decisions|Decision Algorithms]]''',
'''[[GramWord/docs/developer|Hints for developers]]'''<br />
'''[[GramWord/docs/developer|Hints for developers]]''',
'''[[GramWord/docs/bugs|Limitations and Bugs]]'''
'''[[GramWord/docs/bugs|Limitations and Bugs]]'''
----
'''[[GramWord/dict|German Word Lists]]'''

Latest revision as of 09:51, 19 October 2016

GramWord is a Java package which uses a relational (MySql) database to recognize a limited set of German words.

Sets of common words, names, roots and endings of verbs, substantives, adjectives and adverbs, together with their grammatical type and conjugation/declination are preloaded from dictionary files into database tables.

Several decision algorithms use these tables to determine the grammatical type of all words in a text. In the HTML output, the recognized words are shown in different colors.

Short Example

A sentence from "Don Quijote" (hold the mouse over a colored word to see the type of the morphem):

Nachdem er alle diese Vorkehrungen getroffen, wollte er nicht länger warten, sein Vorhaben ins Werk zu setzen; es drängte ihn dazu der Gedanke an die Entbehrung, die die Welt durch sein Zögern erleide, derart waren die Unbilden, denen er zu steuern, die Ungerechtigkeiten, die er zurechtzubringen, die Ungebühr, der er abzuhelfen, die Mißbräuche, die er wiedergutzumachen, kurz, die Pflichten, denen er zu genügen gedachte. Und so, ohne

irgendeinem von seiner Absicht Kunde zu geben und ohne daß jemand ihn sah, bewehrte er sich eines Morgens vor Anbruch des Tages - es war einer der heißen Julitage - mit seiner ganzen Rüstung, stieg auf den Rosinante, nachdem er seinen zusammengeflickten Turnierhelm aufgesetzt, faßte seine Tartsche in den Arm, nahm seinen Speer und zog durch die Hinterpforte seines Hofes hinaus aufs Feld, mit gewaltiger Befriedigung und Herzensfreude darob, mit wie großer Leichtigkeit er sein löbliches Vorhaben auszuführen begonnen.

Longer Example (Chapters 1 - 4 from "Don Quijote")
Coding of Syntactic and Semantic Attributes of Words
Decision Algorithms, Hints for developers, Limitations and Bugs


German Word Lists