예제 #1
0
        public virtual void  initialize(System.String baseDir, System.String configFile)
        {
            wp = new WPhead[5000];
            for (int i = 0; i < 5000; i++)
            {
                wp[i] = new WPhead(this);
            }
            wp_end = 1;

            mn = new MNode[10000];
            for (int i = 0; i < 10000; i++)
            {
                mn[i] = new MNode(this);
            }
            mn_end = 1;

            JSONReader json = new JSONReader(configFile);

            PWT_POS_TDBM_FILE = baseDir + "/" + json.getValue("pwt.pos");
            PTT_POS_TDBM_FILE = baseDir + "/" + json.getValue("ptt.pos");
            PTT_WP_TDBM_FILE  = baseDir + "/" + json.getValue("ptt.wp");

            pwt_pos_tf = new ProbabilityDBM(PWT_POS_TDBM_FILE);
            ptt_wp_tf  = new ProbabilityDBM(PTT_WP_TDBM_FILE);
            ptt_pos_tf = new ProbabilityDBM(PTT_POS_TDBM_FILE);
        }
예제 #2
0
        /// <summary> Initializes the Chart-based Morphological Analyzer plug-in.</summary>
        /// <param name="baseDir">- the path for base directory, which should have the 'conf' and 'data' directory
        /// </param>
        /// <param name="configFile">- the path for the configuration file (relative path to the base directory)
        /// </param>
        public virtual void  initialize(System.String baseDir, System.String configFile)
        {
            JSONReader json = new JSONReader(configFile);

            fileDicSystem      = baseDir + "/" + json.getValue("dic_system");
            fileDicUser        = baseDir + "/" + json.getValue("dic_user");
            fileConnections    = baseDir + "/" + json.getValue("connections");
            fileConnectionsNot = baseDir + "/" + json.getValue("connections_not");
            fileDicAnalyzed    = baseDir + "/" + json.getValue("dic_analyzed");
            fileTagSet         = baseDir + "/" + json.getValue("tagset");

            tagSet = new TagSet();
            tagSet.init(fileTagSet, TagSet.TAG_SET_KAIST);

            connection = new Connection();
            connection.init(fileConnections, tagSet.TagCount, tagSet);

            connectionNot = new ConnectionNot();
            connectionNot.init(fileConnectionsNot, tagSet);

            analyzedDic = new AnalyzedDic();
            analyzedDic.readDic(fileDicAnalyzed);

            systemDic = new Trie(Trie.DEFAULT_TRIE_BUF_SIZE_SYS);
            systemDic.read_dic(fileDicSystem, tagSet);

            userDic = new Trie(Trie.DEFAULT_TRIE_BUF_SIZE_USER);
            userDic.read_dic(fileDicUser, tagSet);

            numDic = new NumberDic();
            simti  = new Simti();
            simti.init();
            eojeolList = new LinkedList <Eojeol>();

            chart = new MorphemeChart(tagSet, connection, systemDic, userDic, numDic, simti, eojeolList);

            postProc = new PostProcessor();
        }
예제 #3
0
        /// <summary> Initializes the Chart-based Morphological Analyzer plug-in.</summary>
        /// <param name="baseDir">- the path for base directory, which should have the 'conf' and 'data' directory
        /// </param>
        /// <param name="configFile">- the path for the configuration file (relative path to the base directory)
        /// </param>
        public virtual void initialize(System.String baseDir, System.String configFile)
        {
            JSONReader json = new JSONReader(configFile);

            fileDicSystem = baseDir + "/" + json.getValue("dic_system");
            fileDicUser = baseDir + "/" + json.getValue("dic_user");
            fileConnections = baseDir + "/" + json.getValue("connections");
            fileConnectionsNot = baseDir + "/" + json.getValue("connections_not");
            fileDicAnalyzed = baseDir + "/" + json.getValue("dic_analyzed");
            fileTagSet = baseDir + "/" + json.getValue("tagset");

            tagSet = new TagSet();
            tagSet.init(fileTagSet, TagSet.TAG_SET_KAIST);

            connection = new Connection();
            connection.init(fileConnections, tagSet.TagCount, tagSet);

            connectionNot = new ConnectionNot();
            connectionNot.init(fileConnectionsNot, tagSet);

            analyzedDic = new AnalyzedDic();
            analyzedDic.readDic(fileDicAnalyzed);

            systemDic = new Trie(Trie.DEFAULT_TRIE_BUF_SIZE_SYS);
            systemDic.read_dic(fileDicSystem, tagSet);

            userDic = new Trie(Trie.DEFAULT_TRIE_BUF_SIZE_USER);
            userDic.read_dic(fileDicUser, tagSet);

            numDic = new NumberDic();
            simti = new Simti();
            simti.init();
            eojeolList = new LinkedList < Eojeol >();

            chart = new MorphemeChart(tagSet, connection, systemDic, userDic, numDic, simti, eojeolList);

            postProc = new PostProcessor();
        }
예제 #4
0
        public virtual void initialize(System.String baseDir, System.String configFile)
        {
            wp = new WPhead[5000];
            for (int i = 0; i < 5000; i++)
            {
                wp[i] = new WPhead(this);
            }
            wp_end = 1;

            mn = new MNode[10000];
            for (int i = 0; i < 10000; i++)
            {
                mn[i] = new MNode(this);
            }
            mn_end = 1;

            JSONReader json = new JSONReader(configFile);
            PWT_POS_TDBM_FILE = baseDir + "/" + json.getValue("pwt.pos");
            PTT_POS_TDBM_FILE = baseDir + "/" + json.getValue("ptt.pos");
            PTT_WP_TDBM_FILE = baseDir + "/" + json.getValue("ptt.wp");

            pwt_pos_tf = new ProbabilityDBM(PWT_POS_TDBM_FILE);
            ptt_wp_tf = new ProbabilityDBM(PTT_WP_TDBM_FILE);
            ptt_pos_tf = new ProbabilityDBM(PTT_POS_TDBM_FILE);
        }