ucot.parser
Class Word

java.lang.Object
  extended by ucot.parser.Word

public class Word
extends java.lang.Object

"Word" of a sentence. It does not nessesary contain a single word but can also contain for example an noun phrase (blak car). Word can contain links to other Word and they are used to model depencies between different parts of sentence.

See Also:
Sentence

Field Summary
private  java.lang.String basicForm
          Basic form of the word this object is carrying.
private  java.util.List<Link> links
          The links from this Word to other words.
private  java.lang.String original
          Original form of the word this object is carrying.
private  java.lang.String wordClass
          Class of the word.
 
Constructor Summary
Word(java.lang.String basicForm, java.lang.String wordClass)
           Constructs the word object.
 
Method Summary
 void addLink(Link l)
          Adds link..
 java.lang.String getBasicForm()
          Returns the basic form of the word.
 Link getLink(java.lang.String name)
           Returns the first link called by spesific name-
 Word getLinked(java.lang.String name)
           Returns the word that is refered by the first link called by the given name.
 java.util.List<Link> getLinks()
           Returns all the links.
 java.util.List<Link> getLinks(java.lang.String name)
           Returns links of spesific name.
 java.lang.String getOriginal()
          Returns the original form of the word.
 java.lang.String getWordClass()
          Returns the word's class (part of the speech: noun, verb and so on).
 boolean RemoveLink(Link l)
           Removes link from this word.
 void setBasicForm(java.lang.String basicForm)
           Sets the basic form of the word.
 void setOriginal(java.lang.String original)
          Sets the original form of the word.
 void setWordClass(java.lang.String wordClass)
          Sets the words class (part of the speech: noun, verb and so on).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

original

private java.lang.String original
Original form of the word this object is carrying.


basicForm

private java.lang.String basicForm
Basic form of the word this object is carrying.


wordClass

private java.lang.String wordClass
Class of the word.

See Also:
ParserInterface.NOUN, ParserInterface.VERB

links

private java.util.List<Link> links
The links from this Word to other words.

Constructor Detail

Word

public Word(java.lang.String basicForm,
            java.lang.String wordClass)

Constructs the word object.

Parameters:
basicForm - The basic form of the word.
wordClass - The class of the word.
Method Detail

addLink

public void addLink(Link l)

Adds link..

Parameters:
l - The link to be added.

getLinks

public java.util.List<Link> getLinks()

Returns all the links. Modifying the link list does not change the true linkages.

Returns:
List of links.

getLinks

public java.util.List<Link> getLinks(java.lang.String name)

Returns links of spesific name. Modification of the returned list does not change the true linkages.

Parameters:
name - The link name we are interested in.
Returns:
The list of the links called by the given name.

getLink

public Link getLink(java.lang.String name)

Returns the first link called by spesific name-

Parameters:
name - The name
Returns:
The first link called by the given name.

getLinked

public Word getLinked(java.lang.String name)

Returns the word that is refered by the first link called by the given name.

Parameters:
name - The name.
Returns:
The word of refered from the first link.

RemoveLink

public boolean RemoveLink(Link l)

Removes link from this word.

Parameters:
l - The link to be removed.
Returns:
True if the link was contained by this word.

getBasicForm

public java.lang.String getBasicForm()

Returns the basic form of the word.

Returns:
the basic form of the word.

setBasicForm

public void setBasicForm(java.lang.String basicForm)

Sets the basic form of the word.

Parameters:
basicForm - The basic form.

getWordClass

public java.lang.String getWordClass()

Returns the word's class (part of the speech: noun, verb and so on).

Returns:
The word's class.

setWordClass

public void setWordClass(java.lang.String wordClass)

Sets the words class (part of the speech: noun, verb and so on).

Parameters:
wordClass - The word's class.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getOriginal

public java.lang.String getOriginal()

Returns the original form of the word.

Returns:
The original form of the word.

setOriginal

public void setOriginal(java.lang.String original)

Sets the original form of the word.

*