public void ExtractCCSClassification() { ExtractFromPaper ext = new ExtractFromPaper(); StreamReader papers = new StreamReader("ACM Papers.txt"); StringBuilder sb = new StringBuilder(); string paper = papers.ReadLine(); ArrayList ccs = new ArrayList(); int index = 0; while (paper != null) { index++; ccs = ext.ExtractCCS (@"D:\Workspace\CMSC 678 - Machine Learning\Project\PaperDump\TEXT\" + paper + ".txt"); string ccsLine = ""; foreach (Object obj in ccs) { sb.AppendLine(index + " " + (string)obj); } paper = papers.ReadLine(); } System.IO.File.WriteAllText("D:\\CCSLearningSet.txt", sb.ToString()); }
public static void extractCCSClassification() { ExtractFromPaper ext = new ExtractFromPaper(); StreamReader papers = new StreamReader("ACM Papers.txt"); StringBuilder sb = new StringBuilder(); string paper = papers.ReadLine(); ArrayList ccs = new ArrayList(); while (paper != null) { ccs = ext.ExtractCCS (@"D:\Workspace\CMSC 678 - Machine Learning\Project\PaperDump\TEXT\" + paper + ".txt"); string ccsLine = ""; foreach (Object obj in ccs) { ccsLine += (string)obj+","; } sb.AppendLine(ccsLine.Substring(0, ccsLine.Length - 1)); paper = papers.ReadLine(); } System.IO.File.WriteAllText("D:\\ccs.txt", sb.ToString()); }