public String getType() { switch (this.program.get_clusterType()) { case Options.MIN_CLUSTER: return msg.getString("Clusters.MIN_single_link"); case Options.MAX_CLUSTER: return msg.getString("Clusters.MAX_complete_link"); case Options.AVR_CLUSTER: return msg.getString("Clusters.AVR_group_average"); default: return msg.getString("Clusters.unknown"); } }
f.println("<H4>" + msg.getString("AllMatches.Distribution") + ":</H4>\n<CENTER>"); f.println("<TABLE CELLPADDING=1 CELLSPACING=1>"); f.println("<TR><TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("AllMatches.Length") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("AllMatches.Number_of_matches") + "<TH ALIGN=center BGCOLOR=#8080ff>.</TR>"); for (int i=0; i<maxLength; i++) {
private int writeLink(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-link.html"); writeHTMLHeader(f, msg.getString("Report.Links")); f.println("<BODY>\n <H3 ALIGN=\"center\">" + TagParser.parse(msg.getString("Report.Matches_for_X1_AND_X2"), new String[] { match.subName(0), match.subName(1) }) + "</H3>"); f.println(" <H1 align=\"center\">" + match.roundedPercent() + "%</H1>\n<CENTER>"); f.println(" <A HREF=\"index.html#matches\" TARGET=\"_top\">" + msg.getString("Report.INDEX") + "</A> - "); f.println(" <A HREF=\"help-" + program.getCountryTag() + ".html\" TARGET=\"_top\">" + msg.getString("Report.HELP") + "</A></CENTER>"); f.println("</BODY>\n</HTML>"); f.close(); return f.bytesWritten(); }
f.println("<!DOCTYPE HTML PUBLIC \"-//DTD HTML 3.2//EN\">"); f.println("<HTML>\n<HEAD>\n<TITLE>" + msg.getString("Clusters.Dendrogram") + "</TITLE>\n" + "<script language=\"JavaScript\" type=\"text/javascript\" " + "src=\"fields.js\">\n</script>\n</HEAD>\n<BODY>"); f.println("<H1>" + msg.getString("Clusters.Dendrogram") + "</H1>"); f.println("<tr><td>" + msg.getString("Clusters.Cluster_size") + ":</td>" + "<td><input type=\"text\" readonly name=\"size\" size=\"5\"></td>"); f.println("<td rowspan=\"3\">" + msg.getString("Clusters.Themewords") + ":</td><td rowspan=\"3\"><textarea cols=\"80\" rows=\"3\" readonly " + "name=\"theme\"></textarea></td></tr>"); f.println("<tr><td>" + msg.getString("Clusters.Threshold") + ":</td><td><input type=\"text\" readonly name=\"thresh\" " + "size=\"6\"></td></tr>"); f.println("<tr><td>" + msg.getString("Clusters.Documents") + ":</td><td><input type=\"text\" readonly name=\"docs\" " + "size=\"30\"></td></tr>"); + msg.getString("Clusters.Dendrogram_picture") + "\" USEMAP=\"#Dendrogram\"></P>"); f.println("</BODY>\n</HTML>");
+ msg.getString("Clusters.Cluster_number") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Size") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Threshold") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Cluster_members") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Most_frequent_words") + "</TR>"); Iterator<Cluster> clusterI = allClusters.iterator(); for (int i=1; clusterI.hasNext(); i++) { f.println("<H5>" + msg.getString("Clusters.Distribution_of_cluster_size") + ":</H5>"); text = "<TABLE CELLPADDING=1 CELLSPACING=1>\n"; text += "<TR><TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Cluster_size") + "<TH ALIGN=center BGCOLOR=#8080ff>" + msg.getString("Clusters.Number_of_clusters") + "<TH ALIGN=center BGCOLOR=#8080ff>.</TR>\n"; for (int i=0; i<=maxSize; i++) {
"BGCOLOR=\"#d0d0d0\">"); f.println("<TR><TH><TH>"+subA.name+" ("+percentA()+"%)<TH>"+ subB.name+" ("+percentB()+"%)<TH>" + msg.getString("AllMatches.Tokens")); for (int i=0; i<size(); i++) { match = matches[i]; + msg.getString("AllMatches.Basecode") + " " + roundedPercentBasecodeA() + "%"); f.println("<TD>" + msg.getString("AllMatches.Basecode") + " " + roundedPercentBasecodeB() + "%<TD> ");
f.println("<TR BGCOLOR=\"#aaaaff\" VALIGN=\"top\"><TD>" + "<BIG><BIG>" + msg.getString("Report.Title") + ":</BIG></BIG><TD><BIG><BIG><CODE>" + program.get_title() + "</CODE></BIG></BIG></TD></TR>"); if (program.get_original_dir() != null) f.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + "<BIG>" + msg.getString("Report.Directory") + ":</BIG></TD><TD><BIG><CODE>" + program.get_original_dir() + (program.get_sub_dir() == null ? "" : File.separator + "*" + File.separator + program.get_sub_dir()) } else { if (this.program.get_original_dir() == null) f.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + "<BIG><BIG>" + msg.getString("Report.Directory") + ":</BIG></BIG><TD><BIG><BIG><CODE>" + msg.getString("Report.Not_available") + "</CODE></BIG></BIG></TD></TR>"); else f.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + "<BIG><BIG>" + msg.getString("Report.Directory") + ":</BIG></BIG></TD><TD><BIG><BIG><CODE>" + program.get_original_dir() + (program.get_sub_dir() == null ? "" : File.separator + "*" + File.separator + program.get_sub_dir()) f.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + msg.getString("Report.Programs") + ":</TD><TD>"); f.println("<CODE>" + program.allValidSubmissions(" - ") + "</CODE></TD></TR>"); f.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + msg.getString("Report.Language") + ":</TD><TD>" + this.language.name() + "</TD></TR>"); f.print("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + msg.getString("Report.Submissions") + ":</TD><TD>" + this.program.validSubmissions()); if (program.getErrors() != 0) { if (this.program.getErrors() == 1) f.print(" <b>(" + msg.getString("Report.1_has_not_been_parsed_successfully") + ")</b>"); else if (this.program.getErrors() > 1) f.print(" <b>(" + TagParser.parse(msg.getString("Report.X_have_not_been_parsed_successfully"), new String[] { program.getErrors() + "" }) + ")</b>");
private int writeDist(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-dist.html"); writeHTMLHeader(f, msg.getString("Report.Token_Distribution")); f.println("<BODY>"); match.distributionReport(f, msg); f.println("</BODY>\n</HTML>"); f.close(); return f.bytesWritten(); }
private int writeTop(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-top.html"); writeHTMLHeaderWithScript(f, "Top"); f.println("<BODY BGCOLOR=\"#ffffff\">"); if (this.program.use_externalSearch()) { f.println("<A HREF=\"match" + i + "-dist.html\" TARGET=\"_top\">" + msg.getString("Report.Distribution") + "</A><P>"); } match.HTMLreport(f, i, this.program); f.println("</BODY>\n</HTML>\n"); f.close(); return f.bytesWritten(); }
+ msg.getString("Report.WhatIsThis") + "</font></small></a>):</H4>"); f.println("<p><a href=\"" + csvfile + "\">download csv</a></p>"); f.println("<TABLE CELLPADDING=3 CELLSPACING=2>");
writeHTMLHeader(f, msg.getString("Report.Clustering_Results")); String clustertype = msg.getString("Report.Type") + ": " + program.clusters.getType(); f.println("<BODY>\n<H2>" + msg.getString("Report.Clustering_Results") + " (" + clustertype + ")</H2>"); f.println("<H3><A HREF=\"dendro.html\">" + msg.getString("Report.Dendrogram") + "</A></H3>"); bytes += this.program.clusters.makeDendrograms(root, clustering); for (int i = 0; i < this.program.get_threshold().length; i++) { float threshold = this.program.get_threshold()[i]; String clustertitle = TagParser.parse(msg.getString("Report.Clusters_for_Xpercent_treshold"), new String[] { threshold + "" }); f.println("<H3><A HREF=\"cluster" + threshold + ".html\">" + clustertitle + "</A></H3>"); increase = 5; for (float threshold = increase; threshold <= program.clusters.maxMergeValue; threshold += increase) { String clustertitle = TagParser.parse(msg.getString("Report.Clusters_for_Xpercent_treshold"), new String[] { threshold + "" }); f.println("<H3><A HREF=\"cluster" + (int) threshold + ".html\">" + clustertitle + "</A></H3>");
private int writeIndex(boolean includeClusterLink) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "index.html"); writeIndexBegin(f, msg.getString("Report.Search_Results")); return matches.percent(); }, "<H4>" + msg.getString("Report.MatchesAvg"), csvfile); return matches.percentMinAB(); }, "<HR><H4>" + msg.getString("Report.MatchesMin"), csvfile); return matches.percentMaxAB(); }, "<HR><H4>" + msg.getString("Report.MatchesMax"), csvfile); f.println("<HR><H4><A HREF=\"cluster.html\">" + msg.getString("Report.Clustering_Results") + "</A></H4>");
private void writeDistribution(HTMLFile f) { // Die Verteilung: int max = 0; for (int i = 0; i < 10; i++) if (dist[i] > max) max = dist[i]; f.println("<H4>" + this.msg.getString("Report.Distribution") + ":</H4>\n<CENTER>"); f.println("<TABLE CELLPADDING=1 CELLSPACING=1>"); for (int i = 9; i >= 0; i--) { f.print("<TR BGCOLOR=" + color(i * 10 + 10, 128, 192, 128, 192, 255, 255) + "><TD ALIGN=center>" + (i * 10) + "% - " + (i * 10 + 10) + "%" + "</TD><TD ALIGN=right>" + dist[i] + "</TD><TD>"); for (int j = (dist[i] * bar_length / max); j > 0; j--) f.print("#"); if (dist[i] * bar_length / max == 0) { if (dist[i] == 0) f.print("."); else f.print("#"); } f.println("</TD></TR>"); } f.println("</TABLE></CENTER>\n<P>\n<HR>"); }
private int writeFrames(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + ".html"); writeHTMLHeader(f, TagParser.parse(msg.getString("Report.Matches_for_X1_AND_X2"), new String[] { match.subName(0), match.subName(1) })); f.println("<FRAMESET ROWS=\"130,*\">\n <FRAMESET COLS=\"30%,70%\">"); f.println(" <FRAME SRC=\"match" + i + "-link.html\" NAME=\"link\" " + "FRAMEBORDER=0>"); f.println(" <FRAME SRC=\"match" + i + "-top.html\" NAME=\"top\" " + "FRAMEBORDER=0>"); f.println(" </FRAMESET>"); f.println(" <FRAMESET COLS=\"50%,50%\">"); f.println(" <FRAME SRC=\"match" + i + "-0.html\" NAME=\"0\">"); f.println(" <FRAME SRC=\"match" + i + "-1.html\" NAME=\"1\">"); f.println(" </FRAMESET>\n</FRAMESET>\n</HTML>"); f.close(); return f.bytesWritten(); }