예제 #1
0
        /// <summary>
        /// load profiles
        /// </summary>
        /// <returns>false if load success</returns>
        private bool LoadProfile()
        {
            string profileDirectory = Get("directory");

            try
            {
                if (profileDirectory != null)
                {
                    DetectorFactory.LoadProfile(profileDirectory);
                }
                else
                {
                    DetectorFactory.LoadProfile();
                }

                long?seed = GetLong("seed");
                if (seed != null)
                {
                    DetectorFactory.SetSeed((int)seed);
                }

                return(false);
            }
            catch (LangDetectException e)
            {
                Console.Error.WriteLine("ERROR: " + e);
                return(true);
            }
        }