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; }
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; }