Esempio n. 1
0
        public static void Init(string fileName)
        {
            lock (_LockObj)
            {
                if (_Inited)
                {
                    return;
                }

                InitInfinitiveVerbTable();

                if (fileName == null)
                {
                    Setting.SettingLoader loader = new 微博舆论.Setting.SettingLoader();
                }
                else
                {
                    Setting.SettingLoader loader = new 微博舆论.Setting.SettingLoader(fileName);
                }

                LoadDictionary();

                _Inited = true;

                _Wildcard = new 微博舆论.Dict.Wildcard(Setting.PanGuSettings.Config.MatchOptions,
                                                   Setting.PanGuSettings.Config.Parameters);

                string dir = Setting.PanGuSettings.Config.GetDictionaryPath();

                if (Setting.PanGuSettings.Config.MatchOptions.WildcardOutput)
                {
                    _Wildcard.Load(dir);
                }
            }
        }
Esempio n. 2
0
        public static void Init(string fileName)
        {
            lock (_LockObj)
            {
                if (_Inited)
                {
                    return;
                }

                InitInfinitiveVerbTable();

                if (fileName == null)
                {
                    Setting.SettingLoader loader = new 微博舆论.Setting.SettingLoader();
                }
                else
                {
                    Setting.SettingLoader loader = new 微博舆论.Setting.SettingLoader(fileName);
                }

                LoadDictionary();

                _Inited = true;

                _Wildcard = new 微博舆论.Dict.Wildcard(Setting.PanGuSettings.Config.MatchOptions,
                    Setting.PanGuSettings.Config.Parameters);

                string dir = Setting.PanGuSettings.Config.GetDictionaryPath();

                if (Setting.PanGuSettings.Config.MatchOptions.WildcardOutput)
                {
                    _Wildcard.Load(dir);
                }

            }
        }