gr.demokritos.iit.jinsect.distributed
Class CalcBehaviour
java.lang.Object
jade.core.behaviours.Behaviour
jade.core.behaviours.SimpleBehaviour
jade.core.behaviours.OneShotBehaviour
gr.demokritos.iit.jinsect.distributed.CalcBehaviour
- All Implemented Interfaces:
- java.io.Serializable
public class CalcBehaviour
- extends jade.core.behaviours.OneShotBehaviour
Implements an OneShotBehaviour
that calculates the similarity between two
documents, using words and char n-grams. The character n-gram part is performed
using the Gauss-normalized methodology.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour |
jade.core.behaviours.Behaviour.RunnableChangedEvent |
Fields inherited from class jade.core.behaviours.Behaviour |
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING |
Constructor Summary |
CalcBehaviour(java.lang.String sDoc1,
java.lang.String sDoc2,
int iWordNGramSize_Min,
int iWordNGramSize_Max,
int iWord_Dmax,
int iCharacterNGramSize_Min,
int iCharacterNGramSize_Max,
int iCharacter_Dmax,
boolean bDoCharNGrams,
boolean bDoWordNGrams,
boolean bSilent,
java.lang.String sID)
Initializes a CalcBehaviour, given two texts to compare and the parameters of
the comparison. |
Method Summary |
void |
action()
Performs the comparisonm and sends the saves the result. |
Methods inherited from class jade.core.behaviours.OneShotBehaviour |
done |
Methods inherited from class jade.core.behaviours.SimpleBehaviour |
reset |
Methods inherited from class jade.core.behaviours.Behaviour |
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, handle, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CalcBehaviour
public CalcBehaviour(java.lang.String sDoc1,
java.lang.String sDoc2,
int iWordNGramSize_Min,
int iWordNGramSize_Max,
int iWord_Dmax,
int iCharacterNGramSize_Min,
int iCharacterNGramSize_Max,
int iCharacter_Dmax,
boolean bDoCharNGrams,
boolean bDoWordNGrams,
boolean bSilent,
java.lang.String sID)
- Initializes a CalcBehaviour, given two texts to compare and the parameters of
the comparison.
- Parameters:
sDoc1
- The first document.sDoc2
- The second document.iWordNGramSize_Min
- The minimum word n-gram to use.iWordNGramSize_Max
- The maximum word n-gram to use.iWord_Dmax
- The maximum neighbourhood word distance to use.iCharacterNGramSize_Min
- The minimum character n-gram to use.iCharacterNGramSize_Max
- The maximum character n-gram to use.iCharacter_Dmax
- The maximum neighbourhood character distance to use.bDoCharNGrams
- If true, character n-gram comparison is performed.bDoWordNGrams
- If true, word n-gram comparison is performed.bSilent
- If true, no debugging messages appear.sID
- A unique identifier for the comparison.
action
public void action()
- Performs the comparisonm and sends the saves the result.
- Specified by:
action
in class jade.core.behaviours.Behaviour