datapreparation.partofspeech
Class PartOfSpeech

java.lang.Object
  extended by control.Operation
      extended by datapreparation.TextOperation
          extended by datapreparation.partofspeech.PartOfSpeech

public class PartOfSpeech
extends TextOperation

Class implementing the part-of speech operation. It uses a pre-trained Maximum Entropy tagger to tag a sentence, all words are extracted, and the tagged text is stored.

Author:
Ole Kristian Fivelstad

Constructor Summary
PartOfSpeech()
          Constructor for the part-of-speech operation.
 
Method Summary
 java.util.ArrayList findSentences(java.lang.String text)
          Method for finding the sentences in a text.
 java.util.ArrayList getProperties()
          Method for getting the porperties.
 void performOperation(DataSet dataSet)
          Method for performing the operation.
 java.lang.String removeChars(java.lang.String word)
          Method for removing characters from a word
 void setProperties(java.util.ArrayList properties)
          Method for setting the properties.
 Text tagTerms(Text text)
          Method for tagging a text
 
Methods inherited from class control.Operation
getLogResult, setLogResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartOfSpeech

public PartOfSpeech()
Constructor for the part-of-speech operation. Initializes a vector of characters that divide the text into sentences or part of sentences. For example, , ) ( and so on.

Method Detail

performOperation

public void performOperation(DataSet dataSet)
Method for performing the operation.

Specified by:
performOperation in class Operation
Parameters:
dataSet - The dataset

tagTerms

public Text tagTerms(Text text)
Method for tagging a text

Parameters:
text -
Returns:
newText

findSentences

public java.util.ArrayList findSentences(java.lang.String text)
Method for finding the sentences in a text.

Parameters:
text - The text
Returns:
ArrayList containing the sentences

removeChars

public java.lang.String removeChars(java.lang.String word)
Method for removing characters from a word

Parameters:
word - The word to clean
Returns:
word after characters are removed

getProperties

public java.util.ArrayList getProperties()
Method for getting the porperties.

Specified by:
getProperties in class Operation
Returns:
List of properties

setProperties

public void setProperties(java.util.ArrayList properties)
Method for setting the properties.

Specified by:
setProperties in class Operation
Parameters:
properties - List of properties