it.polito.elite.doseWS.include
Class MWord
java.lang.Object
it.polito.elite.doseWS.include.MWord
- public class MWord
- extends java.lang.Object
A class for storing mwords contained in each synset that is associated to
the concepts of the ontology actually in use. Supports all required functionalities
including the ability to store and retrieve the frequency with which the
word is seen in the indexed documents
- Since:
- 11/2004
- Version:
- 1.0
- Author:
- Dario Bonino
Alessio Bosca
Federico Pescarmona
Michele Debandi
- See Also:
MWordTest class for testing
|
Constructor Summary |
MWord(java.lang.String mword,
int frequency,
double weight)
Constructor |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MWord
public MWord(java.lang.String mword,
int frequency,
double weight)
- Constructor
- Parameters:
mword - the literal value for the mword represented by this objectfrequency - the frequency of occurence of this mword into indexed documentsweight - the expert given weight for this object
getMWord
public java.lang.String getMWord()
- Returns:
- the literal value of the mword
toString
public java.lang.String toString()
getFrequency
public int getFrequency()
- Returns:
- the frequency, i.e., the number of occurrences
of the mword in the set of indexed documents
getWeight
public double getWeight()
- Returns:
- the weigth given by experts to this mword
setMWord
public void setMWord(java.lang.String mword)
- Parameters:
mword - the literal value to be stored in this object
setFrequency
public void setFrequency(int frequency)
- Parameters:
frequency - the frequency of occurence of this mword into indexed documents
stored in this object
setWeight
public void setWeight(double weight)
- Parameters:
weight - the expert given weight of the mword stored in
this object
setProbability
public void setProbability(double p)
- Parameters:
p - the temporary probability that this mword object has to
cause a document to be annotated as about the concept to which the mword is related
getProbability
public double getProbability()
- Returns:
- the temporary probability that this mword object has to
cause a document to be annotated as about the concept to which the mword is related
serialize
public java.lang.String serialize()
- Returns:
- the serialized version of this object according to a predefined XML format