Ejemplo n.º 1
0
        /// <summary>
        /// 分词
        /// </summary>
        /// <param name="strs"></param>
        /// <returns></returns>
        private ICollection <WordInfo> GetWords(string strs)
        {
            global::PanGu.Match.MatchOptions   Options    = SetOptions();
            global::PanGu.Match.MatchParameter Parameters = SetParameters();
            Segment segment = new Segment();
            ICollection <WordInfo> words = segment.DoSegment(strs, Options, Parameters);

            return(words);
        }
Ejemplo n.º 2
0
        private global::PanGu.Match.MatchParameter SetParameters()
        {
            global::PanGu.Match.MatchParameter Parameters = new global::PanGu.Match.MatchParameter();

            Parameters.Redundancy          = 0;
            Parameters.FilterEnglishLength = 0;
            Parameters.FilterNumericLength = 0;
            return(Parameters);
        }