|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.documentModel.representations.DocumentGraph
public class DocumentGraph
Field Summary | |
---|---|
NormalizerListener |
Normalizer
|
TextPreprocessorListener |
TextPreprocessor
|
WordEvaluatorListener |
WordEvaluator
|
Constructor Summary | |
---|---|
DocumentGraph()
Creates a new instance of DocumentGraph |
|
DocumentGraph(int iMinSize,
int iMaxSize,
int iCorrelationWindow)
Creates a new instance of DocumentGraph |
Method Summary | |
---|---|
double |
calcCoexistenceImportance(java.lang.String sNode)
Returns a functions of [element graph edges max],[number of neighbours], where [element graph edges max] refers to the maximum weight of the edges including [sNode], and [number of neightbours] is its number of neighbours in the graph. |
double |
calcCoexistenceImportance(salvo.jesus.graph.Vertex vNode)
|
void |
createEdgesConnecting(Graph gGraph,
java.lang.String sStartNode,
java.util.List lOtherNodes,
double dStartWeight,
double dIncreaseWeight)
Creates an edge in [gGraph] connecting [sBaseNode] to each node in the [lOtherNodes] list of nodes. |
void |
createNGramGraphs()
Creates the graph of n-grams, for all the levels specified in the MinSize, MaxSize range. |
void |
createWeightedEdgesConnecting(Graph gGraph,
java.lang.String sStartNode,
java.util.List lOtherNodes,
double dStartWeight,
double iNewWeight,
double dDataImportance)
Creates an edge in [gGraph] connecting [sBaseNode] to each node in the [lOtherNodes] list of nodes. |
void |
deleteItem(java.lang.String sItem)
Removes an item (node) from all graphs. |
java.util.HashSet |
getAllNodes()
|
java.lang.String |
getDataString()
|
Graph |
getGraphLevel(int iIndex)
Returns graph with M-based index |
Graph |
getGraphLevelByNGramSize(int iNGramSize)
Returns graph with n-gram-size-based index |
int |
getMaxSize()
|
int |
getMinSize()
|
boolean |
isEmpty()
|
int |
length()
|
void |
loadDataStringFromFile(java.lang.String sFilename)
|
void |
mergeNGramGraph(DocumentGraph dgOtherGraph,
double fWeightPercent)
Merges the data of [dgOtherGraph] document graph to the data of this graph, by adding all existing edges and moving the values of those existing in both graphs towards the new graph values based on a tendenct modifier. |
void |
nullify()
Sets all weights in all graphs to zero |
void |
setDataString(java.lang.String sDataString)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public NormalizerListener Normalizer
public WordEvaluatorListener WordEvaluator
public TextPreprocessorListener TextPreprocessor
Constructor Detail |
---|
public DocumentGraph()
public DocumentGraph(int iMinSize, int iMaxSize, int iCorrelationWindow)
iMinSize
- The minimum n-gram sizeiMaxSize
- The maximum n-gram sizeiCorrelationWindow
- The maximum distance of terms to be considered
as correlated.Method Detail |
---|
public int length()
public boolean isEmpty()
public void loadDataStringFromFile(java.lang.String sFilename) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public Graph getGraphLevel(int iIndex)
iIndex
- The index of the graph. Zero (0) equals to the graph for
level MinSize n-grams.public Graph getGraphLevelByNGramSize(int iNGramSize)
iNGramSize
- The n-gram size of the graph.public java.util.HashSet getAllNodes()
public void createEdgesConnecting(Graph gGraph, java.lang.String sStartNode, java.util.List lOtherNodes, double dStartWeight, double dIncreaseWeight)
gGraph
- The graph to usesStartNode
- The node from which all edges beginlOtherNodes
- The list of nodes to which sBaseNode is connecteddStartWeight
- The initial weight for first-occuring nodesdIncreaseWeight
- The increase of weight for already existing nodes, when there is an occurancepublic void createWeightedEdgesConnecting(Graph gGraph, java.lang.String sStartNode, java.util.List lOtherNodes, double dStartWeight, double iNewWeight, double dDataImportance)
gGraph
- The graph to usesStartNode
- The node from which all edges beginlOtherNodes
- The list of nodes to which sBaseNode is connecteddStartWeight
- The initial weight for first-occuring nodesiNewWeight
- The new weightdDataImportance
- The tendency towards the new value. 0.0 means no change
to the current value. 1.0 means the old value is completely replaced by the
new. 0.5 means the final value is the average of the old and the new.public void createNGramGraphs()
public void mergeNGramGraph(DocumentGraph dgOtherGraph, double fWeightPercent)
dgOtherGraph
- The second graph used for the mergingfWeightPercent
- The convergence tendency parameter. A value of 0.0
means no change to existing value, 1.0 means new value is the same as
that of the new graph. A value of 0.5 means new value is exactly between
the old and new value (average).public int getMinSize()
public int getMaxSize()
public double calcCoexistenceImportance(java.lang.String sNode)
sNode
- The node object the Coexistence Importance of which we calculatepublic double calcCoexistenceImportance(salvo.jesus.graph.Vertex vNode)
public void deleteItem(java.lang.String sItem)
sItem
- The item to remove.public void nullify()
public void setDataString(java.lang.String sDataString)
public java.lang.String getDataString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |