szte.csd
Class ContentShiftDetector

java.lang.Object
  extended by szte.csd.ContentShiftDetector

public class ContentShiftDetector
extends java.lang.Object

The main entry point of the project. ContentShiftDetector performs training and evaluation of the original ContentShiftDetection procedure aling with several baselines (article's results can be replicated).


Constructor Summary
ContentShiftDetector()
           
ContentShiftDetector(java.util.Properties prop)
           
 
Method Summary
 DataHandler buildVSM(DocumentSet docset, DataHandler train)
          Constructs the Vector Space Model according to basic parameters (phrase length, lemmatization etc.).
 DataHandler featuresel(DataHandler vsm)
           
 void fullprocess()
           
 DocumentSet getEval()
           
 IndicatorSelector getIndicatorselector()
           
 java.lang.String getTask()
           
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getTerms()
           
 DocumentSet getTrain()
           
 void initClassifiers(DocumentSet docset)
           
 boolean isAltered(Sentence sentence, int pos)
           
static void main(java.lang.String[] args)
           
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> predictAllVSM(DataHandler vsm, java.lang.String label)
           
 void readCorpora()
           
 void relabel(DataHandler dh, DocumentSet docset, java.lang.String label)
          We use the same Vector Space Model throughout an iteration, just its binary labeling varies according to the target labels of the original document multi-lableing task.
 void setEval(DocumentSet eval)
           
 void setIndicatorselector(IndicatorSelector indicatorselector)
           
 void setIndicatorSelector(java.lang.String indsel)
           
 void setTask(java.lang.String task)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentShiftDetector

public ContentShiftDetector(java.util.Properties prop)

ContentShiftDetector

public ContentShiftDetector()
Method Detail

setIndicatorSelector

public void setIndicatorSelector(java.lang.String indsel)

readCorpora

public void readCorpora()

isAltered

public boolean isAltered(Sentence sentence,
                         int pos)

buildVSM

public DataHandler buildVSM(DocumentSet docset,
                            DataHandler train)
Constructs the Vector Space Model according to basic parameters (phrase length, lemmatization etc.). It employs the CSD, i.e. it ignores the text spans which are predicted to be altered.


relabel

public void relabel(DataHandler dh,
                    DocumentSet docset,
                    java.lang.String label)
             throws java.lang.Exception
We use the same Vector Space Model throughout an iteration, just its binary labeling varies according to the target labels of the original document multi-lableing task.

Throws:
java.lang.Exception

initClassifiers

public void initClassifiers(DocumentSet docset)

predictAllVSM

public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> predictAllVSM(DataHandler vsm,
                                                                                     java.lang.String label)
                                                                              throws java.lang.Exception
Throws:
java.lang.Exception

fullprocess

public void fullprocess()
                 throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

getTerms

public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getTerms()

getIndicatorselector

public IndicatorSelector getIndicatorselector()

setIndicatorselector

public void setIndicatorselector(IndicatorSelector indicatorselector)

getTrain

public DocumentSet getTrain()

getEval

public DocumentSet getEval()

setEval

public void setEval(DocumentSet eval)

getTask

public java.lang.String getTask()

setTask

public void setTask(java.lang.String task)

featuresel

public DataHandler featuresel(DataHandler vsm)
                       throws java.lang.Exception
Throws:
java.lang.Exception