Exemplo n.º 1
0
        public TfidfExtractor()
        {
            Segmenter    = new JiebaSegmenter();
            PosSegmenter = new PosSegmenter(Segmenter);
            SetStopWords(ConfigManager.StopWordsFile);
            if (StopWords.IsEmpty())
            {
                StopWords.UnionWith(DefaultStopWords);
            }

            Loader = new IdfLoader(DefaultIdfFile);

            IdfFreq   = Loader.IdfFreq;
            MedianIdf = Loader.MedianIdf;
        }
Exemplo n.º 2
0
        public TfidfExtractor()
        {
            Segmenter = new JiebaSegmenter();
            PosSegmenter = new PosSegmenter(Segmenter);
            SetStopWords(ConfigManager.StopWordsFile);
            if (StopWords.IsEmpty())
            {
                StopWords.UnionWith(DefaultStopWords);
            }

            Loader = new IdfLoader(DefaultIdfFile);

            IdfFreq = Loader.IdfFreq;
            MedianIdf = Loader.MedianIdf;
        }
Exemplo n.º 3
0
        public TfidfExtractor(JiebaSegmenter segmenter = null)
        {
            Segmenter    = segmenter.IsNull() ? new JiebaSegmenter() : segmenter;
            PosSegmenter = new PosSegmenter(Segmenter);
            //SetStopWords(ConfigManager.StopWordsFile);
            SetFromResources();
            if (StopWords.IsEmpty())
            {
                StopWords.UnionWith(DefaultStopWords);
            }

            //Loader = new IdfLoader(DefaultIdfFile);
            Loader = new IdfLoader();
            Loader.LoadFromResources();


            IdfFreq   = Loader.IdfFreq;
            MedianIdf = Loader.MedianIdf;
        }