GramWord: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
Stub
 
imported>Gfis
with colored example
Line 7: Line 7:
===Short Example===
===Short Example===
A sentence from "Don Quijote":
A sentence from "Don Quijote":
<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>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>
Resulting HTML output:
 
<tt>
<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 />

Revision as of 19:36, 3 September 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":

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.

Resulting HTML output:

<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>.

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