Exemplo n.º 1
0
 public static TFIDFAnalyze Marge(IEnumerable<TFIDFAnalyze> list)
 {
     TFIDFAnalyze analyze = new TFIDFAnalyze();
     foreach (var item in list)
     {
         analyze.AddDocDic(item.DocDic);
     }
     return analyze;
 }
Exemplo n.º 2
0
        public static TFIDFAnalyze Marge(IEnumerable <TFIDFAnalyze> list)
        {
            TFIDFAnalyze analyze = new TFIDFAnalyze();

            foreach (var item in list)
            {
                analyze.AddDocDic(item.DocDic);
            }
            return(analyze);
        }
Exemplo n.º 3
0
 public static TFIDFAnalyze LoadText(string fileName)
 {
     TFIDFAnalyze tfidf = new TFIDFAnalyze();
     foreach (var item in System.IO.File.ReadLines(fileName))
     {
         try
         {
             var d = item.Split('\t');
             int c = int.Parse(d.Last());
             tfidf.Add(d[0], d[1], c);
         }
         catch { }
     }
     return tfidf;
 }
Exemplo n.º 4
0
        public static TFIDFAnalyze LoadText(string fileName)
        {
            TFIDFAnalyze tfidf = new TFIDFAnalyze();

            foreach (var item in System.IO.File.ReadLines(fileName))
            {
                try
                {
                    var d = item.Split('\t');
                    int c = int.Parse(d.Last());
                    tfidf.Add(d[0], d[1], c);
                }
                catch { }
            }
            return(tfidf);
        }
Exemplo n.º 5
0
        public static TFIDFAnalyze Marge(IEnumerable <string> fileNames)
        {
            TFIDFAnalyze analyze = new TFIDFAnalyze();

            foreach (var fileName in fileNames)
            {
                foreach (var item in System.IO.File.ReadLines(fileName))
                {
                    try
                    {
                        var d = item.Split('\t');
                        int c = int.Parse(d.Last());
                        analyze.Add(d[0], d[1], c);
                    }
                    catch { }
                }
            }

            return(analyze);
        }
Exemplo n.º 6
0
        public static TFIDFAnalyze Marge(IEnumerable<string> fileNames)
        {
            TFIDFAnalyze analyze = new TFIDFAnalyze();
            foreach (var fileName in fileNames)
            {
                foreach (var item in System.IO.File.ReadLines(fileName))
                {
                    try
                    {
                        var d = item.Split('\t');
                        int c = int.Parse(d.Last());
                        analyze.Add(d[0], d[1], c);
                    }
                    catch { }
                }
            }

            return analyze;
        }