nl.telin.mymedia.processor
Class CarrotProcessor

java.lang.Object
  extended by nl.telin.mymedia.processor.CarrotProcessor

public class CarrotProcessor
extends java.lang.Object


Constructor Summary
CarrotProcessor()
           
 
Method Summary
 java.lang.String getPrefLabel(java.lang.String subject)
           
 void loadModel(java.lang.String ontology, java.lang.String defaultNS)
          load the ontology model
 java.util.Map<java.lang.String,java.lang.Double> recomputeWeights()
           
 void setTerms(java.util.Set<java.lang.String> terms, java.util.Map<java.lang.String,java.lang.Double> weights)
          Load the subjects that are to be ranked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CarrotProcessor

public CarrotProcessor()
Method Detail

loadModel

public void loadModel(java.lang.String ontology,
                      java.lang.String defaultNS)
               throws java.io.FileNotFoundException
load the ontology model

Parameters:
ontology - path to ontology file
defaultNS - default namespace
Throws:
java.io.FileNotFoundException

setTerms

public void setTerms(java.util.Set<java.lang.String> terms,
                     java.util.Map<java.lang.String,java.lang.Double> weights)
Load the subjects that are to be ranked.

Parameters:
terms - subjects

recomputeWeights

public java.util.Map<java.lang.String,java.lang.Double> recomputeWeights()
Returns:
a map of concept to scores. The higher the score the better

getPrefLabel

public java.lang.String getPrefLabel(java.lang.String subject)