Skip to content
Snippets Groups Projects
Commit aa1d91e5 authored by Stephen Mayhew's avatar Stephen Mayhew
Browse files

First commit

parents
No related branches found
No related tags found
No related merge requests found
{
"Table": [
{"name": "kbp2012_single.csv"},
{"name": "kbp2013_all.csv"}
]}
<!DOCTYPE html>
<html>
<head>
<title>KBP Visualization</title>
<!-- <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script> -->
<!-- <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script> -->
<!-- <script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js?1.29.1"></script> -->
<!-- <script type="text/javascript" src="http://mbostock.github.com/d3/d3.csv.js?1.29.1"></script> -->
<script src="js/colorbrewer.js"></script>
<script src="js/d3.v3.min.js"></script>
<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/bootstrap.css" />
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/dropdown.js"></script>
<script src="js/jquery-ui.js"></script>
<link rel="stylesheet" href="css/messi.min.css" />
<script src="js/messi.js"></script>
<style type="text/css">
svg {
width: 7300px;
height: 1000px;
<!-- border: solid 1px #ccc; -->
font: 10px sans-serif;
shape-rendering: crispEdges;
}
#info {
min-width: 400px;
height: auto;
border: 1px solid #ccc;
padding: 15px;
float: right;
position: fixed;
background: white;
<!-- margin: 20px; -->
moz-box-shadow: 0 0 20px 1px #DDD;
-webkit-box-shadow: 0 0 20px 1px #DDD;
font-size: 24px;
line-height: 140%;
left: 50px;
top: 75px;
}
.legend {
padding: 8px;
border: 1px solid #ccc;
position: fixed;
width: 140px;
background:white;
moz-box-shadow: 0 0 20px 1px #DDD;
-webkit-box-shadow: 0 0 20px 1px #DDD;
left: 50px;
top: 220px;
}
div.box {
width: 30px;
height: 30px;
margin-right: 10px;
display: inline;
float:left;
}
.wrong {
fill: #e31a1c;
stroke: #9e1213;
background: #e31a1c;
border: #9e1213 1px solid;
}
.correct {
fill: #33a02c;
stroke: #23701e;
background: #33a02c;
border: 1px solid #23701e;
}
.inexact {
fill: #ff7f00;
stroke: #b25800;
background: #ff7f00;
border: 1px solid #b25800;
}
.redundant {
fill: #1f78b4;
stroke: #15547d;
background: #1f78b4;
border: 1px solid #15547d;
}
.copy {
padding-left: 20px;
font-style:italic;
color:#DDD;
}
.btnclose {
margin-right:-10px;
}
</style>
<script>
$(function() {
$( ".info" ).draggable();
});
$(function() {
$( ".legend").draggable();
});
</script>
</head>
<body>
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<!-- <div class="container"> -->
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">KBP Visualization</a>
<span style="padding-left:30px">Choose data source:</span>
<select id="selectDataBox" class="dropdown" style="vertical-align:center">
<!-- <option value="dummy">Data source...</option> -->
<!-- <option value="union">Union of All Answers</option> -->
<!-- <option value="hits">HITS</option> -->
<!-- <option value="voting">Voting</option> -->
<!-- <option value="bp">BP</option> -->
<!-- <option value="pagerank">PageRank</option> -->
<!-- <option value="random">Random</option> -->
<!-- <option value="investment">Investment</option> -->
<!-- <option value="averagelog">Average-Log</option> -->
</select>
<button class="btn btnclose" id="sortbutton">Sort Columns</button>
<select id="selectBox" class="dropdown" style="vertical-align:center">
<option value="query">Query</option>
<option value="slot">Slot</option>
<option value="numAns">Num Answers</option>
<option value="numCorrect">Num Correct</option>
</select>
<button class="btn" id="upbutton">Systems Up</button>
<button class="btn" id="downbutton">Systems Down</button>
<!-- <a href="#" id="simple">Help</a> -->
<a href="#" style="margin-left:5px"><span id="simple" class="label label-info">What is this?</span></a>
</div>
</div>
<div id="info" class="info">
<b>System:</b> <span id="system"></span><br>
<b>Claim:</b> <span id="claim"></span><br>
<b>Answer:</b> <span id="answer"></span>
</div>
<!-- <div class="legend"> -->
<!-- <table> -->
<!-- <tr> -->
<!-- <td><b>Legend:</b></td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td><div class="box correct"></div> Correct </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td><div class="box inexact"></div> Inexact </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td><div class="box redundant"></div> Redundant </td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td><div class="box wrong"></div> Wrong </td> -->
<!-- </tr> -->
<!-- </table> -->
<!-- </div> -->
<script type="text/javascript" src="vis.js"></script>
</body>
</html>
Greetings!
To make a new visualization, follow the following steps.
Run makeAnswerHist.py as follows
$ ./makeAnswerHist.py <response file> <judgment file>
The <response file> looks like unionSingleAnswers.
To get the answer file, do the following:
* Run mySFScorer with 'trace' flag
* This gives a large amount of output
* Copy this into a file, and this is the answer file
* Ony copy lines that look like: <Letter> <query:slot> <doc:answer>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment