dragon.nlp.extract
Class AbstractPhraseExtractor

java.lang.Object
  |
  +--dragon.nlp.extract.AbstractConceptExtractor
        |
        +--dragon.nlp.extract.AbstractPhraseExtractor
All Implemented Interfaces:
ConceptExtractor, PhraseExtractor
Direct Known Subclasses:
BasicPhraseExtractor

public abstract class AbstractPhraseExtractor
extends AbstractConceptExtractor
implements PhraseExtractor

Abstract class for phrase extraction

Copyright: Copyright (c) 2005

Company: IST, Drexel University

Version:
1.0
Author:
Davis Zhou

Field Summary
protected  Lemmatiser lemmatiser
           
protected  Tagger tagger
           
protected  boolean useAdj
           
protected  boolean useNoun
           
protected  boolean useVerb
           
protected  Vocabulary vocabulary
           
 
Fields inherited from class dragon.nlp.extract.AbstractConceptExtractor
cf, conceptFilter_enabled, conceptList, parser, subconcept_enabled
 
Constructor Summary
AbstractPhraseExtractor(Vocabulary vocabulary, Tagger tagger, Lemmatiser lemmatiser)
           
 
Method Summary
 Lemmatiser getLemmatiser()
          Gets the lemmtiser used for this extractor.
 Tagger getPOSTagger()
          Gets the part of speech tagger used for the phrase extractor
 boolean getSingleAdjectiveOption()
          Tests if the single-word adjectives will be extracted.
 boolean getSingleNounOption()
          Tests if the single-word nouns will be extracted.
 boolean getSingleVerbOption()
          Tests if the single-word verbs will be extracted.
 Vocabulary getVocabulary()
          Gets the phrase dictionary
 void initDocExtraction()
          It is required to call this method before one calls extractFromDoc method.
 void setLemmatiser(Lemmatiser lemmatiser)
          Sets lemmatiser for this extractor.
 void setSingleAdjectiveOption(boolean option)
          Sets the option of extracting single-word adjectives.
 void setSingleNounOption(boolean option)
          Sets the option of extracting single-word nouns.
 void setSingleVerbOption(boolean option)
          Sets the option of extracting single-word verbs.
 boolean supportConceptEntry()
          Tests if the extracted concept has an entry ID.
 boolean supportConceptName()
          Tests if the extracted concept has a name.
 
Methods inherited from class dragon.nlp.extract.AbstractConceptExtractor
extractFromDoc, extractFromDoc, getConceptFilter, getConceptList, getDocumentParser, getFilteringOption, getSubConceptOption, mergeConceptByEntryID, mergeConceptByName, print, print, setConceptFilter, setDocumentParser, setFilteringOption, setSubConceptOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dragon.nlp.extract.ConceptExtractor
extractFromDoc, extractFromDoc, extractFromSentence, getConceptFilter, getConceptList, getDocumentParser, getFilteringOption, getSubConceptOption, mergeConceptByEntryID, mergeConceptByName, print, print, setConceptFilter, setDocumentParser, setFilteringOption, setSubConceptOption
 

Field Detail

lemmatiser

protected Lemmatiser lemmatiser

tagger

protected Tagger tagger

vocabulary

protected Vocabulary vocabulary

useNoun

protected boolean useNoun

useAdj

protected boolean useAdj

useVerb

protected boolean useVerb
Constructor Detail

AbstractPhraseExtractor

public AbstractPhraseExtractor(Vocabulary vocabulary,
                               Tagger tagger,
                               Lemmatiser lemmatiser)
Method Detail

setSingleNounOption

public void setSingleNounOption(boolean option)
Description copied from interface: PhraseExtractor
Sets the option of extracting single-word nouns.

Specified by:
setSingleNounOption in interface PhraseExtractor
Parameters:
option - the option of extracting single-word nouns

getSingleNounOption

public boolean getSingleNounOption()
Description copied from interface: PhraseExtractor
Tests if the single-word nouns will be extracted.

Specified by:
getSingleNounOption in interface PhraseExtractor
Returns:
true if the single-word nouns will be extracted.

setSingleVerbOption

public void setSingleVerbOption(boolean option)
Description copied from interface: PhraseExtractor
Sets the option of extracting single-word verbs.

Specified by:
setSingleVerbOption in interface PhraseExtractor
Parameters:
option - the option of extracting single-word verbs

getSingleVerbOption

public boolean getSingleVerbOption()
Description copied from interface: PhraseExtractor
Tests if the single-word verbs will be extracted.

Specified by:
getSingleVerbOption in interface PhraseExtractor
Returns:
true if the single-word verbs will be extracted.

setSingleAdjectiveOption

public void setSingleAdjectiveOption(boolean option)
Description copied from interface: PhraseExtractor
Sets the option of extracting single-word adjectives.

Specified by:
setSingleAdjectiveOption in interface PhraseExtractor
Parameters:
option - the option of extracting single-word adjectives

getSingleAdjectiveOption

public boolean getSingleAdjectiveOption()
Description copied from interface: PhraseExtractor
Tests if the single-word adjectives will be extracted.

Specified by:
getSingleAdjectiveOption in interface PhraseExtractor
Returns:
true if the single-word adjectives will be extracted.

supportConceptName

public boolean supportConceptName()
Description copied from interface: ConceptExtractor
Tests if the extracted concept has a name.

Specified by:
supportConceptName in interface ConceptExtractor
Returns:
true or false

supportConceptEntry

public boolean supportConceptEntry()
Description copied from interface: ConceptExtractor
Tests if the extracted concept has an entry ID.

Specified by:
supportConceptEntry in interface ConceptExtractor
Returns:
true or false

getLemmatiser

public Lemmatiser getLemmatiser()
Description copied from interface: ConceptExtractor
Gets the lemmtiser used for this extractor.

Specified by:
getLemmatiser in interface ConceptExtractor
Returns:
the lemmatiser used

setLemmatiser

public void setLemmatiser(Lemmatiser lemmatiser)
Description copied from interface: ConceptExtractor
Sets lemmatiser for this extractor.

Specified by:
setLemmatiser in interface ConceptExtractor
Parameters:
lemmatiser - the lemmatiser

getPOSTagger

public Tagger getPOSTagger()
Description copied from interface: PhraseExtractor
Gets the part of speech tagger used for the phrase extractor

Specified by:
getPOSTagger in interface PhraseExtractor
Returns:
the part of speech tagger

getVocabulary

public Vocabulary getVocabulary()
Description copied from interface: PhraseExtractor
Gets the phrase dictionary

Specified by:
getVocabulary in interface PhraseExtractor
Returns:
the phrase dictionary

initDocExtraction

public void initDocExtraction()
Description copied from interface: ConceptExtractor
It is required to call this method before one calls extractFromDoc method.

Specified by:
initDocExtraction in interface ConceptExtractor