Class Word

java.lang.Object
  extended byWord

public class Word
extends java.lang.Object

The Word-Class functions as the central storage place for variables needed to translate any word. The Grammar-Class is a subclass of Word containing all grammatical information (person, genus, kasus, tempus, info, etc). The Status-Class is also a subclass of word containing the actual status of the translation (e.g. analysed? generated? etc)

Author:
Arthur Laub Arthur.Laub@urz.uni-hd.de Project: Koelschifier

Nested Class Summary
(package private)  class Word.Grammar
          This subclass of word is needed to save all the grammatical information of a word.
(package private)  class Word.Status
          Status is a subclass of Word.
 
Field Summary
static int counter
           
private  int declination_pattern
           
private  Word.Grammar grammar
           
private  java.lang.String hginput
           
private  java.lang.String hglemma
           
private  java.lang.String koeinfinitiv
           
private  java.lang.String koelemma
           
private  java.lang.String koeoutput
           
private  java.lang.String koeplural
           
private  java.lang.String koepraeteritum
           
 int sentencepos
           
private  Word.Status status
           
private  int tag
           
 
Constructor Summary
(package private) Word()
          The empty constructor Word initializes Word.Grammar and Word.Status
(package private) Word(java.lang.String hginput, int tag, java.lang.String hglemma, int sentencepos)
          This constructor of Word sets the params below and initializes Word.Grammar and Word.Status
 
Method Summary
 Word.Grammar getGrammar()
          is used to access according variable of word.
 java.lang.String getHgInput()
          getHgInput is used to access the hginput variable of word.
 java.lang.String getHgLemma()
          getHgLemma is used to access according variable of word.
 int getKoeDeclinition()
          is used to access according variable of word.
 java.lang.String getKoeInfinitiv()
          is used to access according variable of word.
 java.lang.String getKoeLemma()
          is used to access according variable of word.
 java.lang.String getKoePlural()
          is used to access according variable of word.
 java.lang.String getKoePraeteritum()
          is used to access according variable of word.
 java.lang.String getKoeTranslation()
          s used to access according variable of word.
 int getSentencePosition()
          getSentencePosition is used to access according variable of word.
 Word.Status getStatus()
          is used to access according variable of word.
 int getTag()
          getTag is used to access the tag variable of word.
 void setKoeDeclination(int declination_pattern)
          This method sets the Cologne declinition pattern of a regular verb.
 void setKoeInfinitiv(java.lang.String koeinfinitiv)
          This method sets the Cologne Infinitiv supplied by the dictionary.
 void setKoeLemma(java.lang.String koelemma)
          This method sets the Cologne Lemma supplied by the dictionary.
 void setKoeLemma(java.lang.String koelemma, java.lang.String koeplural)
          This method sets the Cologne Lemma and the Colgne plural (mostly used with nomen) supplied by the dictionary.
 void setKoePraeteritum(java.lang.String koepraeteritum)
          This method sets the Cologne praeteritum - stem supplied by the dictionary.
 void setKoeTranslation()
          This method is used to set a Cologne translation which is aquivilent to the Highgerman input.
 void setKoeTranslation(java.lang.String koeoutput)
          setKoeTranslation is used when the translation is found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

public static int counter

grammar

private Word.Grammar grammar

hginput

private java.lang.String hginput

hglemma

private java.lang.String hglemma

koeoutput

private java.lang.String koeoutput

koeinfinitiv

private java.lang.String koeinfinitiv

koepraeteritum

private java.lang.String koepraeteritum

declination_pattern

private int declination_pattern

koelemma

private java.lang.String koelemma

koeplural

private java.lang.String koeplural

sentencepos

public int sentencepos

status

private Word.Status status

tag

private int tag
Constructor Detail

Word

Word()
The empty constructor Word initializes Word.Grammar and Word.Status


Word

Word(java.lang.String hginput,
     int tag,
     java.lang.String hglemma,
     int sentencepos)
This constructor of Word sets the params below and initializes Word.Grammar and Word.Status

Parameters:
hginput - (the Highgerman input)
tag - (the word-tag supplied by the Tagger)
hglemma - (the Highgerman lemma supplied by the tagger)
sentencepos - (the position of the word in the sentence)
Method Detail

getGrammar

public Word.Grammar getGrammar()
is used to access according variable of word.

Returns:
grammar, i.e. all the grammar information of word (Word.Grammar)

getHgInput

public final java.lang.String getHgInput()
getHgInput is used to access the hginput variable of word.

Returns:
hginput (the Highgerman input of word)

getHgLemma

public final java.lang.String getHgLemma()
getHgLemma is used to access according variable of word.

Returns:
hglemma (the Highgerman lemma of word)

getKoeLemma

public final java.lang.String getKoeLemma()
is used to access according variable of word.

Returns:
koelemma (the Cologne Lemma of word)

getKoeDeclinition

public final int getKoeDeclinition()
is used to access according variable of word.

Returns:
the declinition pattern or Cons.IRREGULAR in case of an irregular verb

getKoeInfinitiv

public final java.lang.String getKoeInfinitiv()
is used to access according variable of word.

Returns:
the Colgne infinitiv of a verb

getKoePraeteritum

public final java.lang.String getKoePraeteritum()
is used to access according variable of word.

Returns:
the Cologne past-stem of of verb. Needed especially with irregular verbs.

getKoePlural

public final java.lang.String getKoePlural()
is used to access according variable of word.

Returns:
koeplural (the Cologne plural lemma of word)

getKoeTranslation

public final java.lang.String getKoeTranslation()
s used to access according variable of word.

Returns:
kououtput (the Cologne translation of the Highgerman input)

getSentencePosition

public final int getSentencePosition()
getSentencePosition is used to access according variable of word.

Returns:
sentencepos (the position of the word in the Highgerman sentence)

getStatus

public Word.Status getStatus()
is used to access according variable of word.

Returns:
status of the translation (Word.Status)

getTag

public final int getTag()
getTag is used to access the tag variable of word.

Returns:
tag (the word tag of word)

setKoeInfinitiv

public final void setKoeInfinitiv(java.lang.String koeinfinitiv)
This method sets the Cologne Infinitiv supplied by the dictionary. The infinitiv is needed to analyse and generate a Cologne verb.

Parameters:
koeinfinitiv - (supplied by the Cologne dictionary)

setKoeDeclination

public final void setKoeDeclination(int declination_pattern)
This method sets the Cologne declinition pattern of a regular verb. The information is supplied by the dictionary. It is needed to generate a regular Cologne Verb in the right way. The declination_pattern is also used to distinguish between regular and irregular verbs. In case of an irregular verb, the Cologne dictionary states Cons.IRREGULAR instead of a pattern.

Parameters:
declination_pattern - (supplied by the Cologne dictionary)

setKoePraeteritum

public final void setKoePraeteritum(java.lang.String koepraeteritum)
This method sets the Cologne praeteritum - stem supplied by the dictionary. The praeteritum is needed to generate the past tense of irregular verbs correctly.

Parameters:
koepraeteritum - (supplied by the Cologne dictionary)

setKoeLemma

public final void setKoeLemma(java.lang.String koelemma)
This method sets the Cologne Lemma supplied by the dictionary. Normally further generation is needed to get a final translation.

Parameters:
koelemma - (supplied by the Cologne dictionary)

setKoeLemma

public final void setKoeLemma(java.lang.String koelemma,
                              java.lang.String koeplural)
This method sets the Cologne Lemma and the Colgne plural (mostly used with nomen) supplied by the dictionary. Normally further generation is needed to get a final translation.

Parameters:
koelemma - (supplied by the Cologne dictionary)
koeplural - (supplied by the Cologne dictionary)

setKoeTranslation

public final void setKoeTranslation()
This method is used to set a Cologne translation which is aquivilent to the Highgerman input. Normally used for interpunction, numbers, etc. The Word.Status is set accordingly. (No further analysation etc.)


setKoeTranslation

public final void setKoeTranslation(java.lang.String koeoutput)
setKoeTranslation is used when the translation is found. The Word.Status is set accordingly. (No further analysation etc.)

Parameters:
koeoutput - (the Cologne translation)