pull/39/head
cneud 5 years ago
parent 10d991b362
commit 8ddbda9784

@ -13,28 +13,29 @@
</head> </head>
<body> <body>
<strong>ner.ed | simple editor for named entity recognition TSV</strong><br><br> <strong>ner.ed | simple editor for named entity recognition TSV</strong><br><br>
<div id="table"></div>
<script> <script>
var data; var data;
function handleFileSelect(evt) { function handleFileSelect(evt) {
var file = evt.target.files[0]; var file = evt.target.files[0];
Papa.parse(file, { Papa.parse(file, {
header: true, header: true,
delimiter: '\t', delimiter: '\t',
comments: "#", comments: "#",
skipEmptyLines: true, skipEmptyLines: true,
dynamicTyping: true, dynamicTyping: true,
complete: function(results) { complete: function(results) {
console.log(results); console.log(results);
data = results; data = results;
} }
}); });
} }
$(document).ready(function(){ $(document).ready(function(){
$("#tsv-file").change(handleFileSelect); $("#tsv-file").change(handleFileSelect);
}); });
</script> </script>
<input type="file" id="tsv-file" name="files"/> <input type="file" id="tsv-file" name="files"/>
</body> </body>

Loading…
Cancel
Save