datapreparation.concept
Class Concept

java.lang.Object
  extended by control.Operation
      extended by datapreparation.TextOperation
          extended by datapreparation.concept.Concept

public class Concept
extends TextOperation

Class implementing the concept extraction operation. The operation finds by concepts by both finding common parents between words, and by checking the category-relation of the words.

Author:
Ole Kristian

Constructor Summary
Concept()
           
 
Method Summary
 Text extractConcepts(Text text)
          Method for extracting concepts from a text.
 java.util.ArrayList<java.lang.String> findCategory(net.didion.jwnl.data.Synset candidate)
          Method for finding the category of a synset.
 java.lang.String findCommonParent(net.didion.jwnl.data.Synset first, net.didion.jwnl.data.Synset second)
          Method for finding the common parent between two synsets.
 java.util.ArrayList findConcepts(java.lang.String candidate)
          Method for finding concepts.
 java.util.ArrayList findParent(java.lang.String termString)
          Method for finding the parent node of a word in WordNet
 net.didion.jwnl.data.Synset findSynset(java.lang.String term)
          Method for getting the synset of a term.
 java.util.ArrayList getProperties()
          Method for getting the properties.
 void initializeCandidates(java.util.ArrayList terms)
          Method for finding the terms which have been disambiguated.
 void performOperation(DataSet dataSet)
          Method for performing the operation.
 void setProperties(java.util.ArrayList properties)
          Method for setting the properties.
 
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

Concept

public Concept()
Method Detail

performOperation

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

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

initializeCandidates

public void initializeCandidates(java.util.ArrayList terms)
Method for finding the terms which have been disambiguated. These are candidates for concept extraction.

Parameters:
terms - The terms in the text.

extractConcepts

public Text extractConcepts(Text text)
Method for extracting concepts from a text.

Parameters:
text - The text
Returns:
The new text

findSynset

public net.didion.jwnl.data.Synset findSynset(java.lang.String term)
Method for getting the synset of a term.

Parameters:
term - The term
Returns:
The synset

findParent

public java.util.ArrayList findParent(java.lang.String termString)
Method for finding the parent node of a word in WordNet

Parameters:
termString - The word
Returns:
List containing all parent nodes.

findCommonParent

public java.lang.String findCommonParent(net.didion.jwnl.data.Synset first,
                                         net.didion.jwnl.data.Synset second)
Method for finding the common parent between two synsets.

Parameters:
first - The first synset
second - The second synset
Returns:
The common parent

findCategory

public java.util.ArrayList<java.lang.String> findCategory(net.didion.jwnl.data.Synset candidate)
Method for finding the category of a synset.

Parameters:
candidate - The candidate synset
Returns:
List containing the categories of the synset

findConcepts

public java.util.ArrayList findConcepts(java.lang.String candidate)
Method for finding concepts. This method uses the methods findCategory and findCommonParent.

Parameters:
candidate - The candidate word
Returns:
List of concepts

getProperties

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

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