public object Execute() { Console.WriteLine("Services Loading..."); AppSettingCache.Instance.Init(); //CustomerCache.Instance.SerializeInit(); //PlatFormCache.Instance.SerializeInit(); LuceneEngine engine = new LuceneEngine(); engine.Init(); ////点播 //if (bool.Parse(AppSettingCache.Instance["VodAct"])) //{ // BoxTypeCache.Instance.SerializeInit(); // RecommandCache.Instance.SerializeInit(); // ListCache.Instance.SerializeInit(); // TagCache.Instance.SerializeInit(); //} ////直播 //if (bool.Parse(AppSettingCache.Instance["LiveAct"])) //{ // ChannelLiveItemsCache.Instance.SerializeInit(); // LiveTypeCache.Instance.SerializeInit(); // LiveListCache.Instance.SerializeInit(); // LiveTypeDicCache.Instance.SerializeInit(); // LiveRecommandCache.Instance.SerializeInit(); //} //后台接口 if (bool.Parse(AppSettingCache.Instance["BackJobAct"])) { YesterdayListCache.Instance.SerializeInit(); } return(null); }
public object Execute() { Console.WriteLine("Services Loading..."); AppSettingCache.Instance.Init(); //CustomerCache.Instance.SerializeInit(); //PlatFormCache.Instance.SerializeInit(); LuceneEngine engine = new LuceneEngine(); engine.Init(); ////点播 //if (bool.Parse(AppSettingCache.Instance["VodAct"])) //{ // BoxTypeCache.Instance.SerializeInit(); // RecommandCache.Instance.SerializeInit(); // ListCache.Instance.SerializeInit(); // TagCache.Instance.SerializeInit(); //} ////直播 //if (bool.Parse(AppSettingCache.Instance["LiveAct"])) //{ // ChannelLiveItemsCache.Instance.SerializeInit(); // LiveTypeCache.Instance.SerializeInit(); // LiveListCache.Instance.SerializeInit(); // LiveTypeDicCache.Instance.SerializeInit(); // LiveRecommandCache.Instance.SerializeInit(); //} //后台接口 if (bool.Parse(AppSettingCache.Instance["BackJobAct"])) { YesterdayListCache.Instance.SerializeInit(); } return null; }
public void ContainAnalyzerTest() { LuceneEngine engine = new LuceneEngine(); engine.Init(); //string text = "三国演义"; //string text = "a|f|g|i|m"; string text = "NBA常规赛-快船vs凯尔特人"; TextReader tr = new StringReader(text); PanGuTokenizer ct = new PanGuTokenizer(tr); int end = 0; Lucene.Net.Analysis.Token t; string ss = string.Empty; while (end < text.Length) { t = ct.Next(); end = t.EndOffset(); ss = ss + t.TermText() + "/ "; } string xxx = ss; }
public void SpellTest() { LuceneEngine engine = new LuceneEngine(); engine.Init(); var firsts = SpellUtils.GetCnSegment("NBA常规赛-快船vs凯尔特人"); var spells = SpellUtils.GetSpellSegment("战重警和"); var segment = new Segment(); var collection = segment.DoSegment("国际足球100509K联赛釜山-大田"); var list = new List <string>(); foreach (WordInfo word in collection) { if (word == null) { continue; } list.Add(word.Word); } //var list = SpellUtils.GetSpellSegment("战警"); string sss = "san国yan义"; string ssss = Synacast.LuceneNetSearcher.Searcher.Searcher.SegmentKeyWord(sss); string text = "重庆"; TextReader tr = new StringReader(text); PanGuTokenizer ct = new PanGuTokenizer(tr); int end = 0; Lucene.Net.Analysis.Token t; string ss = string.Empty; while (end < text.Length) { t = ct.Next(); end = t.EndOffset(); ss = ss + t.TermText() + "/ "; } }
public void SpellTest() { LuceneEngine engine = new LuceneEngine(); engine.Init(); var firsts = SpellUtils.GetCnSegment("NBA常规赛-快船vs凯尔特人"); var spells = SpellUtils.GetSpellSegment("战重警和"); var segment = new Segment(); var collection = segment.DoSegment("国际足球100509K联赛釜山-大田"); var list = new List<string>(); foreach (WordInfo word in collection) { if (word == null) continue; list.Add(word.Word); } //var list = SpellUtils.GetSpellSegment("战警"); string sss = "san国yan义"; string ssss = Synacast.LuceneNetSearcher.Searcher.Searcher.SegmentKeyWord(sss); string text = "重庆"; TextReader tr = new StringReader(text); PanGuTokenizer ct = new PanGuTokenizer(tr); int end = 0; Lucene.Net.Analysis.Token t; string ss = string.Empty; while (end < text.Length) { t = ct.Next(); end = t.EndOffset(); ss = ss + t.TermText() + "/ "; } }