package org.studiorailgun;

import org.studiorailgun.ai.conversation.categorization.SentenceFunctionCategorizor;
import org.studiorailgun.ai.conversation.evaluators.greet.GreetingEval;
import org.studiorailgun.ai.conversation.parser.NLPParser;
import org.studiorailgun.ai.conversation.parser.bank.LemmaBank;
import org.studiorailgun.ai.conversation.tracking.Conversation;
import org.studiorailgun.ai.knowledge.CSVExport;
import org.studiorailgun.ai.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();
        LemmaBank.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);
    }

}
