package org.studiorailgun;

import org.studiorailgun.conversation.categorization.SentenceFunctionCategorizor;
import org.studiorailgun.conversation.evaluators.greet.GreetingEval;
import org.studiorailgun.conversation.parser.NLPParser;
import org.studiorailgun.conversation.tracking.Conversation;
import org.studiorailgun.knowledge.CSVExport;
import org.studiorailgun.knowledge.KnowledgeWeb;

/**
 * Global variables
 */
public class Globals {
    
    /**
     * The knowledge web
     */
    public static KnowledgeWeb web;

    /**
     * The current conversation
     */
    public static Conversation conversation;

    /**
     * Initializes the knowledge web
     */
    public static void init(String webPath){
        //initialize evaluators
        GreetingEval.init();
        SentenceFunctionCategorizor.init();

        //init nlp parser
        NLPParser.init();

        //init web
        Globals.web = KnowledgeWeb.load(webPath);
        Globals.web.initLinks();

        CSVExport.export("temp");

        //init convo
        Globals.conversation = Conversation.parse(Globals.web);
    }

}
