org.eml.sir.retr
Class SirDiscourse

java.lang.Object
  extended byorg.eml.sir.retr.SirDiscourse

public class SirDiscourse
extends java.lang.Object

Wrapper class for MMAX2Discourse realizing easy access to the SIR-specific discourses, espacially on the data relevant for generating terms.

Author:
Hendrik Niederlich (EML-R)

Field Summary
static int FEAT_ACTIVITY
          Constant for professional features of SirDiscourse.
static int FEAT_ALL
          Constant for professional features of SirDiscourse.
static int FEAT_NOT
          Constant for professional features of SirDiscourse.
static int FEAT_OBJECT
          Constant for professional features of SirDiscourse.
static int FEAT_OTHER
          Constant for professional features of SirDiscourse.
static int FEAT_WORKING_PLACE
          Constant for professional features of SirDiscourse.
static java.lang.String TYPE_NP
          Constant for phrase type of SirDiscourse.
static java.lang.String TYPE_PP
          Constant for phrase type of SirDiscourse.
 
Constructor Summary
SirDiscourse(java.lang.String fileName, boolean isProfile)
          Create a new SirDiscourse instance.
 
Method Summary
 java.util.ArrayList getBaseList()
          Return all stem occurences contained in this SirDiscourse according to the setting of the part-of-speech category and the compund base merging.
 java.util.ArrayList getConstituentList(java.lang.String t)
          TYPE_NP / TYPE_PP ignores: ignoreIrrelevantClauses, onlyPositiveProfFeatures, onlyNegativeProfFeatures
 java.lang.String getFileName()
          Return the file name.
 int getNumberOfIrrelevantClauses()
          Return number of requested clauses.
 int getNumberOfNegativeOpinionWords()
          Return number of requested words.
 int getNumberOfNegativeProfessionalFeatures()
          Return number of requested features.
 int getNumberOfNeutralOpinionWords()
          Return number of requested words.
 int getNumberOfOpinionWords()
          Return number of requested words.
 int getNumberOfOtherProfessionalCategory()
          Return number of requested feature.
 int getNumberOfPositiveOpinionWords()
          Return number of requested words.
 int getNumberOfPositiveProfessionalFeatures()
          Return number of requested features.
 int getNumberOfProfessionalActivity()
          Return number of requested feature.
 int getNumberOfProfessionalObject()
          Return number of requested feature.
 int getNumberOfProfessionalPlace()
          Return number of requested feature.
 int getNumberOfSentences()
          Return the number of sentences.
 int getNumberOfStrongOpinionWords()
          Return number of requested words.
 int getNumberOfSurelyIrrelevantClauses()
          Return number of requested clauses.
 int getNumberOfUnsurelyIrrelevantClauses()
          Return number of requested clauses.
 int getNumberOfVerbNodes()
          Return the number of verb-nodes.
 int getNumberOfWords()
          Return the number of words (including punctuation marks '.' and ',').
 int getNumberOfWordsInSentences()
          Return the number of words in sentences.
 int getNumberOfWordsInVerbNodes()
          Return the number of words in verb-nodes.
 int getOnlyNegativeProfFeatures()
          Get the type of negative professional feature will be exclusivly returned by using getWordList() or getBaseList().
 int getOnlyPositiveProfFeatures()
          Get what type of positive professional feature will be exclusivly returned by using getWordList() or getBaseList().
 char getPosCategory()
          Return what kind of part-of-speech the words/bases are that this SirDiscourse instance returns.
 java.util.ArrayList getWordList()
          Return list of words of this SirDiscourse.
 boolean isCompoundBaseMerging()
          Return wether this SirDiscourse merges the bases of compounds to one term or delivers the bases each as one seperate term.
 boolean isIgnoreIrrelevantClauses()
          Return wether this SirDiscourse ignores irrelevant clauses when returning words (getWordList()) or bases (getBaseList()).
 boolean isProfile()
          Return wether this SirDiscourse is a profile.
 void setCompoundBaseMerging(boolean merge)
          Set wether this SirDiscourse merges the bases of compounds to one term or delivers the bases each as one seperate term.
 void setFileName(java.lang.String fileName)
          Set the file name.
 void setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
          Set wether this SirDiscourse ignores irrelevant clauses when returning words (getWordList()) or bases (getBaseList()).
 void setOnlyNegativeProfFeatures(int onlyNegativeProfFeatures)
          Set the type of negative professional feature will be exclusivly returned by using getWordList() or getBaseList().
 void setOnlyPositiveProfFeatures(int onlyPositiveProfFeatures)
          Set what type of positive professional feature will be exclusivly returned by using getWordList() or getBaseList().
 void setPosCategory(char cat)
          Set what kind of part-of-speech the words/bases are that this SirDiscourse instance returns.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEAT_NOT

public static final int FEAT_NOT
Constant for professional features of SirDiscourse. Feature category is "no professional feature".

See Also:
Constant Field Values

FEAT_ACTIVITY

public static final int FEAT_ACTIVITY
Constant for professional features of SirDiscourse. Feature category is "activity".

See Also:
Constant Field Values

FEAT_OBJECT

public static final int FEAT_OBJECT
Constant for professional features of SirDiscourse. Feature category is "object".

See Also:
Constant Field Values

FEAT_WORKING_PLACE

public static final int FEAT_WORKING_PLACE
Constant for professional features of SirDiscourse. Feature category is "working place".

See Also:
Constant Field Values

FEAT_OTHER

public static final int FEAT_OTHER
Constant for professional features of SirDiscourse. Feature category is "other feature".

See Also:
Constant Field Values

FEAT_ALL

public static final int FEAT_ALL
Constant for professional features of SirDiscourse. Feature category is "all features".

See Also:
Constant Field Values

TYPE_NP

public static final java.lang.String TYPE_NP
Constant for phrase type of SirDiscourse. Phrase type is "nominal phrase".

See Also:
Constant Field Values

TYPE_PP

public static final java.lang.String TYPE_PP
Constant for phrase type of SirDiscourse. Phrase type is "prepositional phrase".

See Also:
Constant Field Values
Constructor Detail

SirDiscourse

public SirDiscourse(java.lang.String fileName,
                    boolean isProfile)
Create a new SirDiscourse instance.

Method Detail

getFileName

public java.lang.String getFileName()
Return the file name.


setFileName

public void setFileName(java.lang.String fileName)
Set the file name.


isProfile

public boolean isProfile()
Return wether this SirDiscourse is a profile.


getPosCategory

public char getPosCategory()
Return what kind of part-of-speech the words/bases are that this SirDiscourse instance returns. Use part-of-speech constants of org.eml.sir.Constant.


setPosCategory

public void setPosCategory(char cat)
Set what kind of part-of-speech the words/bases are that this SirDiscourse instance returns. Use part-of-speech constants of org.eml.sir.Constant.


isCompoundBaseMerging

public boolean isCompoundBaseMerging()
Return wether this SirDiscourse merges the bases of compounds to one term or delivers the bases each as one seperate term.


setCompoundBaseMerging

public void setCompoundBaseMerging(boolean merge)
Set wether this SirDiscourse merges the bases of compounds to one term or delivers the bases each as one seperate term.


isIgnoreIrrelevantClauses

public boolean isIgnoreIrrelevantClauses()
Return wether this SirDiscourse ignores irrelevant clauses when returning words (getWordList()) or bases (getBaseList()).


setIgnoreIrrelevantClauses

public void setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
Set wether this SirDiscourse ignores irrelevant clauses when returning words (getWordList()) or bases (getBaseList()).

Parameters:
ignoreIrrelevantClauses - The ignoreIrrelevantClauses to set.

getOnlyNegativeProfFeatures

public int getOnlyNegativeProfFeatures()
Get the type of negative professional feature will be exclusivly returned by using getWordList() or getBaseList().


setOnlyNegativeProfFeatures

public void setOnlyNegativeProfFeatures(int onlyNegativeProfFeatures)
Set the type of negative professional feature will be exclusivly returned by using getWordList() or getBaseList().


getOnlyPositiveProfFeatures

public int getOnlyPositiveProfFeatures()
Get what type of positive professional feature will be exclusivly returned by using getWordList() or getBaseList().


setOnlyPositiveProfFeatures

public void setOnlyPositiveProfFeatures(int onlyPositiveProfFeatures)
Set what type of positive professional feature will be exclusivly returned by using getWordList() or getBaseList().

Parameters:
onlyPositiveProfFeatures - The onlyPositiveProfFeatures to set.

getNumberOfWords

public int getNumberOfWords()
Return the number of words (including punctuation marks '.' and ',').


getNumberOfSentences

public int getNumberOfSentences()
Return the number of sentences.


getNumberOfWordsInSentences

public int getNumberOfWordsInSentences()
Return the number of words in sentences.


getNumberOfVerbNodes

public int getNumberOfVerbNodes()
Return the number of verb-nodes.


getNumberOfWordsInVerbNodes

public int getNumberOfWordsInVerbNodes()
Return the number of words in verb-nodes.


getNumberOfIrrelevantClauses

public int getNumberOfIrrelevantClauses()
Return number of requested clauses.


getNumberOfUnsurelyIrrelevantClauses

public int getNumberOfUnsurelyIrrelevantClauses()
Return number of requested clauses.


getNumberOfSurelyIrrelevantClauses

public int getNumberOfSurelyIrrelevantClauses()
Return number of requested clauses.


getNumberOfPositiveProfessionalFeatures

public int getNumberOfPositiveProfessionalFeatures()
Return number of requested features.


getNumberOfNegativeProfessionalFeatures

public int getNumberOfNegativeProfessionalFeatures()
Return number of requested features.


getNumberOfProfessionalActivity

public int getNumberOfProfessionalActivity()
Return number of requested feature.


getNumberOfProfessionalObject

public int getNumberOfProfessionalObject()
Return number of requested feature.


getNumberOfProfessionalPlace

public int getNumberOfProfessionalPlace()
Return number of requested feature.


getNumberOfOtherProfessionalCategory

public int getNumberOfOtherProfessionalCategory()
Return number of requested feature.


getNumberOfOpinionWords

public int getNumberOfOpinionWords()
Return number of requested words.


getNumberOfPositiveOpinionWords

public int getNumberOfPositiveOpinionWords()
Return number of requested words.


getNumberOfNegativeOpinionWords

public int getNumberOfNegativeOpinionWords()
Return number of requested words.


getNumberOfNeutralOpinionWords

public int getNumberOfNeutralOpinionWords()
Return number of requested words.


getNumberOfStrongOpinionWords

public int getNumberOfStrongOpinionWords()
Return number of requested words.


getWordList

public java.util.ArrayList getWordList()
Return list of words of this SirDiscourse. Compund base merging does not affect the words.


getBaseList

public java.util.ArrayList getBaseList()
Return all stem occurences contained in this SirDiscourse according to the setting of the part-of-speech category and the compund base merging.


getConstituentList

public java.util.ArrayList getConstituentList(java.lang.String t)
TYPE_NP / TYPE_PP ignores: ignoreIrrelevantClauses, onlyPositiveProfFeatures, onlyNegativeProfFeatures