// Path: freya/freya-annotate/src/main/java/org/freya/model/OntologyElement.java
// public interface OntologyElement extends Serializable {
// 
// 	public String getFunction();
// 
// 	public void setFunction(String function);
// 
// 	public boolean isAlreadyAdded();
// 
// 	public void setAlreadyAdded(boolean alreadyAdded);
// 
// 	public Annotation getAnnotation();
// 	
// 	public void setAnnotation(Annotation annotation);
// 
// 	public String getVariable();
// 
// 	public void setVariable(String key);
// 
// 	public boolean isMainSubject();
// 
// 	public void setMainSubject(boolean value);
// 
// 	public List<String> getResults();
// 
// 	public void setResults(List<String> results);
// 
// 	public Object getData();
// 
// 	public void setData(Object data);
// 
// 	public void setScore(Score score);
// 
// 	public Score getScore();
// 
// 	public boolean isAnswer();
// 
// 	public void setAnswer(boolean isAnswer);
// 
// 	public boolean equals(Object o);
// 
// }


import static java.net.URLDecoder.decode;
import static java.util.Arrays.asList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.freya.model.OntologyElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import edu.smu.tspell.wordnet.NounSynset;
import edu.smu.tspell.wordnet.Synset;
import edu.smu.tspell.wordnet.SynsetType;
import edu.smu.tspell.wordnet.VerbSynset;
import edu.smu.tspell.wordnet.WordNetDatabase;

		while (j < 2) {

			NounSynset nounSynset;
			NounSynset[] hyponyms;

			Synset[] synsets = database.getSynsets(a[j], SynsetType.NOUN);
			System.out.println("*********************************************");
			for (int i = 0; i < synsets.length; i++) {
				nounSynset = (NounSynset) (synsets[i]);
				hyponyms = nounSynset.getHyponyms();

				System.err.println(nounSynset.getWordForms()[0] + ": "
						+ nounSynset.getDefinition() + ") has "
						+ hyponyms.length + " hyponyms:");

				for (NounSynset hyponym : hyponyms) {
					System.out.println(hyponym.getWordForms()[0]);
				}
			}
			j++;
		}
		System.out.println("*********************************************");

	}

    /**
     * @param text
     * @param suggestions
     * @return
     */

// Path: freya/freya-annotate/src/main/java/org/freya/model/OntologyElement.java
// public interface OntologyElement extends Serializable {
// 
// 	public String getFunction();
// 
// 	public void setFunction(String function);
// 
// 	public boolean isAlreadyAdded();
// 
// 	public void setAlreadyAdded(boolean alreadyAdded);
// 
// 	public Annotation getAnnotation();
// 	
// 	public void setAnnotation(Annotation annotation);
// 
// 	public String getVariable();
// 
// 	public void setVariable(String key);
// 
// 	public boolean isMainSubject();
// 
// 	public void setMainSubject(boolean value);
// 
// 	public List<String> getResults();
// 
// 	public void setResults(List<String> results);
// 
// 	public Object getData();
// 
// 	public void setData(Object data);
// 
// 	public void setScore(Score score);
// 
// 	public Score getScore();
// 
// 	public boolean isAnswer();
// 
// 	public void setAnswer(boolean isAnswer);
// 
// 	public boolean equals(Object o);
// 
// }


// Path: freya/freya-annotate/src/main/java/org/freya/similarity/WordnetInvoker.java
import static java.net.URLDecoder.decode;
import static java.util.Arrays.asList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.freya.model.OntologyElement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import edu.smu.tspell.wordnet.NounSynset;
import edu.smu.tspell.wordnet.Synset;
import edu.smu.tspell.wordnet.SynsetType;
import edu.smu.tspell.wordnet.VerbSynset;
import edu.smu.tspell.wordnet.WordNetDatabase;

		while (j < 2) {

			NounSynset nounSynset;
			NounSynset[] hyponyms;

			Synset[] synsets = database.getSynsets(a[j], SynsetType.NOUN);
			System.out.println("*********************************************");
			for (int i = 0; i < synsets.length; i++) {
				nounSynset = (NounSynset) (synsets[i]);
				hyponyms = nounSynset.getHyponyms();

				System.err.println(nounSynset.getWordForms()[0] + ": "
						+ nounSynset.getDefinition() + ") has "
						+ hyponyms.length + " hyponyms:");

				for (NounSynset hyponym : hyponyms) {
					System.out.println(hyponym.getWordForms()[0]);
				}
			}
			j++;
		}
		System.out.println("*********************************************");

	}

    /**
     * @param text
     * @param suggestions
     * @return
     */

    public float getSynonymWeight(String text, List<OntologyElement> suggestions) {
