gr.demokritos.iit.jinsect.documentModel.representations
Class DocumentNGramGaussNormGraph

java.lang.Object
  extended by gr.demokritos.iit.jinsect.documentModel.representations.DocumentNGramGraph
      extended by gr.demokritos.iit.jinsect.documentModel.representations.DocumentNGramGaussNormGraph
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DocumentNGramGaussNormSymWinGraph

public class DocumentNGramGaussNormGraph
extends DocumentNGramGraph

A Document N-gram Graph that uses a Gaussian bell scaling faction to determine weights applied to various distances of neighbouring n-grams.

See Also:
Serialized Form

Field Summary
 EdgeCachedLocator eclLocator
           
 
Fields inherited from class gr.demokritos.iit.jinsect.documentModel.representations.DocumentNGramGraph
CorrelationWindow, DataString, DegradedEdges, MaxSize, MinSize, NGramGraphArray, Normalizer, TextPreprocessor, WordEvaluator
 
Constructor Summary
DocumentNGramGaussNormGraph()
          Creates a new instance of INSECTDocumentGraph
DocumentNGramGaussNormGraph(int iMinSize, int iMaxSize, int iCorrelationWindow)
          Creates a new instance of INSECTDocumentGraph
 
Method Summary
 void createEdgesConnecting(Graph gGraph, java.lang.String sStartNode, java.util.List lOtherNodes, java.util.HashMap hAppearenceHistogram)
          Creates an edge in [gGraph] connecting [sBaseNode] to each node in the [lOtherNodes] list of nodes.
 void createGraphs()
          Creates the graph of n-grams, for all the levels specified in the MinSize, MaxSize range.
protected  void InitGraphs()
           
protected  double ScalingFunction(int iDistance)
          A function providing a scaling factor according to the distance between any two n-grams.
 
Methods inherited from class gr.demokritos.iit.jinsect.documentModel.representations.DocumentNGramGraph
calcCoexistenceImportance, calcCoexistenceImportance, clone, createWeightedEdgesConnecting, degrade, degredationDegree, deleteItem, getAllNodes, getDataString, getGraphLevel, getGraphLevelByNGramSize, getMaxSize, getMinSize, getWindowSize, intersectGraph, inverseIntersectGraph, isEmpty, length, loadDataStringFromFile, main, mergeGraph, nullify, prune, setDataString, toCooccurenceText
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eclLocator

public EdgeCachedLocator eclLocator
Constructor Detail

DocumentNGramGaussNormGraph

public DocumentNGramGaussNormGraph()
Creates a new instance of INSECTDocumentGraph


DocumentNGramGaussNormGraph

public DocumentNGramGaussNormGraph(int iMinSize,
                                   int iMaxSize,
                                   int iCorrelationWindow)
Creates a new instance of INSECTDocumentGraph

Parameters:
iMinSize - The minimum n-gram size
iMaxSize - The maximum n-gram size
iCorrelationWindow - The standard deviation of the Gaussian scaling function to use when determining neighbouring weights.
Method Detail

createGraphs

public void createGraphs()
Creates the graph of n-grams, for all the levels specified in the MinSize, MaxSize range. The whole document is taken into account for neighbouring, even though the distance affects neighbouring importance, by scaling the neighbouring weight by a Gaussian function of distance.

Overrides:
createGraphs in class DocumentNGramGraph

createEdgesConnecting

public void createEdgesConnecting(Graph gGraph,
                                  java.lang.String sStartNode,
                                  java.util.List lOtherNodes,
                                  java.util.HashMap hAppearenceHistogram)
Creates an edge in [gGraph] connecting [sBaseNode] to each node in the [lOtherNodes] list of nodes. If an edge exists, its weight is increased by [iIncreaseWeight], else its weight is set to [iStartWeight]

Overrides:
createEdgesConnecting in class DocumentNGramGraph
Parameters:
gGraph - The graph to use
sStartNode - The node from which all edges begin
lOtherNodes - The list of nodes to which sBaseNode is connected
hAppearenceHistogram - The histogram of appearences of the terms

ScalingFunction

protected double ScalingFunction(int iDistance)
A function providing a scaling factor according to the distance between any two n-grams.

Parameters:
iDistance - The distance between the two n-grams.
Returns:
A double scaling factor.

InitGraphs

protected void InitGraphs()
Overrides:
InitGraphs in class DocumentNGramGraph