public class DocumentDisplayer extends Object
Modifier and Type | Field and Description |
---|---|
private StyledDocument |
doc |
private cern.colt.list.DoubleArrayList |
doubarray |
private SOMLibSparseInputData |
inputvectors |
private cern.colt.list.IntArrayList |
intarray |
private Object[] |
itemNames |
(package private) String |
newline |
(package private) ArrayList<String>[] |
parsedDocuments |
private CommonSOMViewerStateData |
state |
private SOMLibTemplateVector |
templatevectors |
private JTextPane |
textp |
Constructor and Description |
---|
DocumentDisplayer(CommonSOMViewerStateData st,
JScrollPane pane,
ArrayList<String>[] parsedDoc,
Object[] items) |
Modifier and Type | Method and Description |
---|---|
protected void |
addStylesToDocument(StyledDocument doc,
Color[] col) |
void |
clearResults() |
private double |
getBorderSentence(cern.colt.list.DoubleArrayList doublearray) |
private double |
getBorderWord() |
private double |
getBorderWord(int ind) |
private void |
highlight_sent(double border,
String sent,
double score)
highlights sentence with a colour according to its score
|
private void |
highlight_word(double border,
String sent) |
private void |
removehighlightStyles() |
void |
searchString(int docID,
ArrayList<String> doku,
String str) |
void |
setCaretPosition(int i) |
void |
setPalette(Color[] palet) |
void |
showAllResults(ArrayList<String> result,
cern.colt.list.DoubleArrayList resultscores,
ArrayList<String> resultItemnames,
boolean scores,
int highl,
boolean filename) |
void |
showOriginal(ArrayList<String> result,
cern.colt.list.DoubleArrayList[] allscores,
boolean scores,
int highl,
boolean filename)
shows full text and highlights selected sentences used for summarization
|
void |
showOriginal(int docID,
ArrayList<String> result,
cern.colt.list.DoubleArrayList allscores,
boolean scores,
int highl,
boolean filename)
shows original text and highlights the sentences equal to the sentences in 'result'
|
void |
showResult(int docID,
ArrayList<String> resultdoc,
cern.colt.list.DoubleArrayList resultscores,
boolean scores,
int highl,
boolean filename)
displays results
|
private StyledDocument doc
private JTextPane textp
String newline
private Object[] itemNames
private CommonSOMViewerStateData state
private SOMLibSparseInputData inputvectors
private SOMLibTemplateVector templatevectors
private cern.colt.list.IntArrayList intarray
private cern.colt.list.DoubleArrayList doubarray
public DocumentDisplayer(CommonSOMViewerStateData st, JScrollPane pane, ArrayList<String>[] parsedDoc, Object[] items)
public void showResult(int docID, ArrayList<String> resultdoc, cern.colt.list.DoubleArrayList resultscores, boolean scores, int highl, boolean filename)
public void showAllResults(ArrayList<String> result, cern.colt.list.DoubleArrayList resultscores, ArrayList<String> resultItemnames, boolean scores, int highl, boolean filename)
public void showOriginal(ArrayList<String> result, cern.colt.list.DoubleArrayList[] allscores, boolean scores, int highl, boolean filename)
public void showOriginal(int docID, ArrayList<String> result, cern.colt.list.DoubleArrayList allscores, boolean scores, int highl, boolean filename)
private double getBorderSentence(cern.colt.list.DoubleArrayList doublearray)
private double getBorderWord(int ind)
private double getBorderWord()
private void highlight_word(double border, String sent)
private void highlight_sent(double border, String sent, double score)
public void setCaretPosition(int i)
public void clearResults()
public void setPalette(Color[] palet)
private void removehighlightStyles()
protected void addStylesToDocument(StyledDocument doc, Color[] col)