it.polito.elite.doseWS.agency.messages
Class LearningMessage

java.lang.Object
  extended byit.polito.elite.doseWS.agency.messages.Message
      extended byit.polito.elite.doseWS.agency.messages.LearningMessage

public class LearningMessage
extends Message

Author:
bonino TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
LearningMessage()
           
 
Method Summary
 java.lang.String createAckMsg()
           
 java.lang.String createMsg(java.util.Hashtable mwords, java.util.HashSet cwords, java.lang.String language)
          Conctructs a learning message starting from an hashtable of mword and a vector of cword.
 java.util.Set getConceptsToLearn()
           
 java.util.Set getConceptsToUpdate()
           
static java.lang.String getID()
           
 java.util.Set getToLearnMWords()
           
 Synset getToUpdateSynset(java.lang.String concept)
           
static Message parse(java.lang.String msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LearningMessage

public LearningMessage()
Method Detail

createMsg

public java.lang.String createMsg(java.util.Hashtable mwords,
                                  java.util.HashSet cwords,
                                  java.lang.String language)
Conctructs a learning message starting from an hashtable of mword and a vector of cword. Each base element of both collections is a LearningPair composed by a term and and its occurrence within the document

Parameters:
mwords - Hashtable of mword occurences grouped by concepts
cwords - Vector of new terms with teir occurrence within the document
Returns:

parse

public static Message parse(java.lang.String msg)
Parameters:
msg - the message to be parsed
Returns:
the LearningMessage object corresponding to msg

getConceptsToLearn

public java.util.Set getConceptsToLearn()
Returns:
the Set of concepts to which the mwords to learn are associated

getConceptsToUpdate

public java.util.Set getConceptsToUpdate()
Returns:
the Set of concepts to which the mwords to update probabilities are associated

getToLearnMWords

public java.util.Set getToLearnMWords()
Returns:
the synset to learn associated to that concept

getToUpdateSynset

public Synset getToUpdateSynset(java.lang.String concept)
Parameters:
concept - the concept for which a synset to update probabilities must be extracted
Returns:
the synset to update probabilities associated to that concept

getID

public static java.lang.String getID()

createAckMsg

public java.lang.String createAckMsg()
Returns: