public List <DataGridFriendlyComment> ExportComments() { /* * R Code * library(tm) * library(wordcloud) * * comments = read.csv("d:\\comments.csv", stringsAsFactors=FALSE) * names(comments) = c("comment") * * corpus = Corpus(VectorSource(comments[,1])) * corpus = tm_map(corpus, tolower) #corpus = tm_map(corpus, PlainTextDocument) * corpus = tm_map(corpus, removePunctuation) * corpus = tm_map(corpus, removeWords, stopwords("english")) * frequencies = DocumentTermMatrix(corpus) * sparse = removeSparseTerms(frequencies, 0.99) * all = as.data.frame(as.matrix(sparse)) * * wordcloud(colnames(all), colSums(all)) */ LoadHistory(); var result = new List <DataGridFriendlyComment>(); foreach (var cs in _history.ChangeSets) { result.Add(new DataGridFriendlyComment { Committer = cs.Committer, Comment = cs.Comment }); } Csv.Write(Path.Combine(_outputPath, "comments.csv"), result); return(result); }
public List <Coupling> AnalyzeChangeCoupling() { LoadHistory(); LoadMetrics(); // Pair wise couplings var couplingAnalyzer = new ChangeCouplingAnalyzer(); var couplings = couplingAnalyzer.CalculateChangeCouplings(_history, GetDisplayFilter()); var sortedCouplings = couplings.OrderByDescending(coupling => coupling.Degree).ToList(); Csv.Write(Path.Combine(_outputPath, "change_couplings.csv"), sortedCouplings); // TODO I removed this from the wiki // Same with classified folders (show this one if available) var mappingFile = Path.Combine(_outputPath, "logical_components.xml"); if (File.Exists(mappingFile)) { return(AnalyzeLogicalComponentChangeCoupling(mappingFile)); } return(sortedCouplings); }