Increased recon batch size to 10 again. Various style tweaks. Polished up freebase extension's dialogs to be a bit more helpful
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1625 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
424501ba0e
commit
2d9e7c87f6
@ -1,11 +1,17 @@
|
||||
<div class="dialog-frame" style="width: 400px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Are You Sure?</div>
|
||||
<div class="dialog-body" bind="dialogBody"><table><tr>
|
||||
<td width="30%"><img src="/images/cop.png" width="140px"></td>
|
||||
<td>Are you sure this data is ready to be <b>tested</b> for upload into <b>Freebase</b>?</td>
|
||||
</tr></table></div>
|
||||
<div class="dialog-header" bind="dialogHeader">QA Data Load?</div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<p class="body-text">Other people will be enlisted to help double-check
|
||||
your data load for quality assurance purposes. Their time and labor
|
||||
have a cost.
|
||||
</p>
|
||||
<p class="body-text">You yourself should have taken all reasonable measures
|
||||
to eliminate errors from your data load. Your prudence is greatly appreciated.
|
||||
</p>
|
||||
<p><a href="http://wiki.freebase.com/wiki/Refinery" target="_blank">Tell me more ...</a></p>
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter">
|
||||
<button class="button" bind="okButton">Yes, I'm sure</button>
|
||||
<button class="button" bind="cancelButton">No</button>
|
||||
<button class="button" bind="okButton">Yes, QA Data Load</button>
|
||||
<button class="button" bind="cancelButton">Cancel</button>
|
||||
</div>
|
||||
</div>
|
@ -1,19 +1,70 @@
|
||||
<div class="dialog-frame" style="width: 800px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Load Data into Freebase</div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<div bind="unalignedCase" style="display: none;" class="freebase-loading-tripleloader-message">
|
||||
<h2>This dataset has no triples</h2>
|
||||
<p>Have you aligned it with Freebase's schemas yet? <button class="button" bind="alignButton">Align Now</button></p>
|
||||
</div>
|
||||
<div bind="functionalCase" style="display: none;">
|
||||
<div class="refine-tabs" bind="functionalTabs">
|
||||
<ul>
|
||||
<li><a href="#freebase-loading-dialog-functional-tabs-settings">Settings</a></li>
|
||||
<li><a href="#freebase-loading-dialog-functional-tabs-preview">Preview</a></li>
|
||||
</ul>
|
||||
<div id="freebase-loading-dialog-functional-tabs-settings"
|
||||
class="freebase-loading-dialog-functional-tab-panel"><div class="grid-layout layout-normal"><table>
|
||||
<tr><td width="20%">Name of data load</td>
|
||||
<td colspan="2"><input type="text" size="40" id="freebase-loading-source-name" bind="source_name" /></td>
|
||||
</tr>
|
||||
<tr><td>Source ID (optional)</td>
|
||||
<td colspan="2"><input type="text" size="60" id="freebase-loading-source-id" bind="source_id" /></td>
|
||||
</tr>
|
||||
<tr><td colspan="3">
|
||||
<p class="body-text">Note: Your data will only be loaded into
|
||||
<a href="http://www.sandbox-freebase.com/" target="_blank">Sandbox</a>.
|
||||
Sandbox is where everyone can experiment with Freebase technologies without disruption
|
||||
to the official <a href="http://www.freebase.com/">Freebase</a>. Sandbox gets
|
||||
<a href="http://wiki.freebase.com/wiki/Sandbox" target="_blank">refreshed periodically</a>.
|
||||
</p>
|
||||
<p class="body-text">In order to load your data into the official Freebase, you must first load it
|
||||
into Sandbox. Then it must pass a Quality Assurance (QA) process before it can
|
||||
be loaded into Freebase proper.
|
||||
<a href="http://wiki.freebase.com/wiki/Refinery" target="_blank">Find out more ...</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>Quality assurance</td>
|
||||
<td><input bind="qaCheckbox" type="checkbox" name="qa" value="qa" /></td>
|
||||
<td>After loaded into Sandbox, enlist other people's help to double-check
|
||||
this data load's quality so that it can be loaded into Freebase.
|
||||
</td>
|
||||
</tr>
|
||||
</table></div></div>
|
||||
<div id="freebase-loading-dialog-functional-tabs-preview"
|
||||
class="freebase-loading-dialog-functional-tab-panel freebase-loading-tripleloader-data"
|
||||
style="display: none;"
|
||||
bind="previewContainer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div bind="loadedCase" style="display: none;" class="freebase-loading-tripleloader-message">
|
||||
<h2><span bind="tripleCountSpan"></span> triples successfully scheduled for loading</h2>
|
||||
<h4>Follow the loading progress in the <a bind="refineryLink" target="_new">Freebase Refinery</a>.</h4>
|
||||
</div>
|
||||
<div bind="errorCase" style="display: none;" class="freebase-loading-tripleloader-message">
|
||||
<h2 bind="errorMessage"></h2>
|
||||
<div bind="errorDetails"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter">
|
||||
<table width="100%"><tr>
|
||||
<td bind="left" style="text-align: left" width="40%" nowrap="true">
|
||||
<button class="button" bind="cancelButton" id="freebase-loading-cancel">Cancel</button>
|
||||
</td>
|
||||
<td bind="center" style="text-align: center" width="20%" nowrap="true">
|
||||
<div bind="authorization" class="freebase-loading-authorization"></div>
|
||||
</td>
|
||||
<td bind="right" style="text-align: right" width="40%" nowrap="true">
|
||||
<span bind="qaCheckboxContainer">Ready to perform QA on this data? <input bind="qaCheckbox" type="checkbox" name="qa" value="qa"></span>
|
||||
<button class="button" bind="loadButton" id="freebase-loading-load" disabled="disabled">Load to Sandbox</button>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter"><div class="grid-layout layout-normal layout-full"><table><tr>
|
||||
<td bind="left" style="text-align: left" width="60%" nowrap="true">
|
||||
<button class="button" bind="cancelButton" id="freebase-loading-cancel">Cancel</button>
|
||||
</td>
|
||||
<td bind="center" style="text-align: right" width="20%" nowrap="true">
|
||||
<div bind="authorization" class="freebase-loading-authorization"></div>
|
||||
</td>
|
||||
<td bind="right" style="text-align: right" width="20%" nowrap="true">
|
||||
<button class="button button-primary button-disabled" bind="loadButton" id="freebase-loading-load" disabled>Load to Sandbox</button>
|
||||
</td>
|
||||
</tr></table></div></div>
|
||||
</div>
|
@ -59,11 +59,17 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
loadButton.unbind().click(function() {
|
||||
self._load();
|
||||
});
|
||||
|
||||
self._signedin = true;
|
||||
$("#freebase-loading-source-name").keyup();
|
||||
|
||||
if (typeof cont == "function") cont(data);
|
||||
} else {
|
||||
authorization.html('<a href="javascript:{}" bind="signin">Sign into Freebase</a> to enable loading').show();
|
||||
|
||||
self._signedin = false;
|
||||
$("#freebase-loading-source-name").keyup();
|
||||
|
||||
DOM.bind(authorization).signin.click(function() {
|
||||
Sign.signin(function() {
|
||||
check_authorization(cont);
|
||||
@ -105,24 +111,19 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
engine: JSON.stringify(ui.browsingEngine.getJSON())
|
||||
},
|
||||
function(data) {
|
||||
var body = self._elmts.dialogBody;
|
||||
if ("tripleloader" in data) {
|
||||
body.html(
|
||||
'<div class="freebase-loading-tripleloader-info"><table><tr>' +
|
||||
'<td><div>Name this data load ¬ <sup style="color: red">required</sup></div>' +
|
||||
'<input type="text" size="40" id="freebase-loading-source-name" bind="source_name"></td>' +
|
||||
'<td><div>Source ID ¬ <sup style="color: #888">optional</sup></div>' +
|
||||
'<input type="text" size="60" id="freebase-loading-source-id" bind="source_id"></td>' +
|
||||
'</tr></table></div>' +
|
||||
'<div class="freebase-loading-tripleloader-data">' + data.tripleloader + '</div>'
|
||||
);
|
||||
self._elmts = DOM.bind(dialog);
|
||||
self._elmts.functionalCase.show();
|
||||
self._level = DialogSystem.showDialog(dialog);
|
||||
|
||||
self._elmts.functionalTabs.tabs();
|
||||
|
||||
self._elmts.previewContainer.text(data.tripleloader).show();
|
||||
|
||||
self._elmts.source_name.keyup(function() {
|
||||
if (self._signedin && $(this).val() != "") {
|
||||
loadButton.removeAttr("disabled");
|
||||
loadButton.removeAttr("disabled").removeClass("button-disabled");
|
||||
} else {
|
||||
loadButton.attr("disabled","disabled");
|
||||
loadButton.attr("disabled","disabled").addClass("button-disabled");
|
||||
}
|
||||
});
|
||||
|
||||
@ -139,24 +140,21 @@ FreebaseLoadingDialog.prototype._createDialog = function() {
|
||||
"/command/core/get-preference?" + $.param({ project: theProject.id, name: "freebase.load.jobName" }),
|
||||
null,
|
||||
function(data) {
|
||||
if (data.value != null) {
|
||||
self._elmts.source_name[0].value = data.value;
|
||||
}
|
||||
self._elmts.source_name[0].value = (data.value) ? data.value : theProject.metadata.name;
|
||||
}
|
||||
);
|
||||
|
||||
if (typeof cont == "function") cont();
|
||||
} else {
|
||||
body.html(
|
||||
'<div class="freebase-loading-tripleloader-message">'+
|
||||
'<h2>This dataset has no triples</h2>' +
|
||||
'<p>Have you aligned it with the Freebase schemas yet?</p>' +
|
||||
'</div>'
|
||||
);
|
||||
self._elmts = DOM.bind(dialog);
|
||||
self._elmts.unalignedCase.show();
|
||||
self._level = DialogSystem.showDialog(dialog);
|
||||
|
||||
self._elmts.alignButton.click(function() {
|
||||
self._dismiss();
|
||||
FreebaseExtension.handlers.editSchemaAlignment(false);
|
||||
});
|
||||
self._end();
|
||||
}
|
||||
self._level = DialogSystem.showDialog(dialog);
|
||||
},
|
||||
"json"
|
||||
);
|
||||
@ -189,12 +187,10 @@ FreebaseLoadingDialog.prototype._load = function() {
|
||||
|
||||
var body = self._elmts.dialogBody;
|
||||
if ("status" in data && typeof data.status == "object" && "code" in data.status && data.status.code == 200) {
|
||||
body.html(
|
||||
'<div class="freebase-loading-tripleloader-message">' +
|
||||
'<h2><span>' + data.result.added + '</span> triples successfully scheduled for loading</h2>' +
|
||||
'<h4>Follow the loading progress in the <a href="' + get_refinery_url(data.result.status_url) + '" target="_new">Freebase Refinery</a></h4>' +
|
||||
'</div>'
|
||||
);
|
||||
self._elmts.tripleCountSpan.text(data.result.added);
|
||||
self._elmts.refineryLink.attr("href", get_refinery_url(data.result.status_url));
|
||||
self._elmts.functionalCase.hide();
|
||||
self._elmts.loadedCase.show();
|
||||
self._end();
|
||||
} else {
|
||||
self._show_error("Error loading data",data);
|
||||
@ -229,25 +225,22 @@ FreebaseLoadingDialog.prototype._dismiss = function() {
|
||||
};
|
||||
|
||||
FreebaseLoadingDialog.prototype._show_error = function(msg, error) {
|
||||
console.log(error);
|
||||
var self = this;
|
||||
var body = self._elmts.dialogBody;
|
||||
body.html(
|
||||
'<div class="freebase-loading-tripleloader-message">' +
|
||||
'<h2>' + msg + '</h2>' +
|
||||
(('message' in error) ? '<p>' + error.message + '</p>' : '<pre>' + JSON.stringify(error, null, 2) + '</pre>') +
|
||||
(('stack' in error) ? '<pre>' + error.stack.replace(/\\n/g,'\n').replace(/\\t/g,'\t') + '</pre>' : "") +
|
||||
'</div>'
|
||||
this._elmts.dialogBody.children().hide();
|
||||
this._elmts.errorCase.show();
|
||||
this._elmts.errorMessage.text(msg);
|
||||
this._elmts.errorDetails.html(
|
||||
(('message' in error) ? '<p>' + error.message + '</p>' : '<pre>' + JSON.stringify(error, null, 2) + '</pre>') +
|
||||
(('stack' in error) ? '<pre>' + error.stack.replace(/\\n/g,'\n').replace(/\\t/g,'\t') + '</pre>' : "")
|
||||
);
|
||||
this._end();
|
||||
console.log(error);
|
||||
};
|
||||
|
||||
FreebaseLoadingDialog.prototype._end = function() {
|
||||
var self = this;
|
||||
self._elmts.loadButton.text("Close").removeAttr("disabled").unbind().click(function() {
|
||||
this._elmts.loadButton.text("Close").removeAttr("disabled").removeClass("button-disabled").unbind().click(function() {
|
||||
self._dismiss();
|
||||
});
|
||||
self._elmts.cancelButton.hide();
|
||||
self._elmts.qaCheckboxContainer.hide();
|
||||
self._elmts.authorization.hide();
|
||||
this._elmts.cancelButton.hide();
|
||||
this._elmts.authorization.hide();
|
||||
};
|
@ -166,6 +166,11 @@ SchemaAlignment.createNewRootNode = function() {
|
||||
|
||||
function SchemaAlignmentDialog(protograph, onDone) {
|
||||
this._onDone = onDone;
|
||||
this._createDialog();
|
||||
this._reset(protograph);
|
||||
}
|
||||
|
||||
SchemaAlignmentDialog.prototype._reset = function(protograph) {
|
||||
this._originalProtograph = protograph || { rootNodes: [] };
|
||||
this._protograph = cloneDeep(this._originalProtograph); // this is what can be munched on
|
||||
|
||||
@ -173,94 +178,9 @@ function SchemaAlignmentDialog(protograph, onDone) {
|
||||
this._protograph.rootNodes.push(SchemaAlignment.createNewRootNode());
|
||||
}
|
||||
|
||||
$(this._nodeTable).empty();
|
||||
|
||||
this._nodeUIs = [];
|
||||
this._createDialog();
|
||||
this.preview();
|
||||
}
|
||||
|
||||
SchemaAlignmentDialog.prototype._createDialog = function() {
|
||||
var self = this;
|
||||
var frame = DialogSystem.createDialog();
|
||||
|
||||
frame.width("800px");
|
||||
|
||||
var header = $('<div></div>').addClass("dialog-header").text("Schema Alignment").appendTo(frame);
|
||||
var body = $('<div></div>').addClass("dialog-body").appendTo(frame);
|
||||
var footer = $('<div></div>').addClass("dialog-footer").appendTo(frame);
|
||||
|
||||
this._constructFooter(footer);
|
||||
this._constructBody(body);
|
||||
|
||||
this._level = DialogSystem.showDialog(frame);
|
||||
|
||||
this._renderBody(body);
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype._constructFooter = function(footer) {
|
||||
var self = this;
|
||||
|
||||
$('<button class="button"></button>').html(" OK ").click(function() {
|
||||
var protograph = self.getJSON();
|
||||
|
||||
Refine.postProcess(
|
||||
"freebase",
|
||||
"save-protograph",
|
||||
{},
|
||||
{ protograph: JSON.stringify(protograph) },
|
||||
{},
|
||||
{
|
||||
onDone: function() {
|
||||
DialogSystem.dismissUntil(self._level - 1);
|
||||
theProject.overlayModels.freebaseProtograph = protograph;
|
||||
}
|
||||
}
|
||||
);
|
||||
}).appendTo(footer);
|
||||
|
||||
$('<button class="button"></button>').text("Cancel").click(function() {
|
||||
DialogSystem.dismissUntil(self._level - 1);
|
||||
}).appendTo(footer);
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype._constructBody = function(body) {
|
||||
$('<p>' +
|
||||
'The schema alignment skeleton below specifies how the graph-shaped data that will get generated ' +
|
||||
'from your grid-shaped data and written into Freebase. The cells in each record of your data will ' +
|
||||
'get placed into nodes within the skeleton. Configure the skeleton by specifying which ' +
|
||||
'column to substitute into which node. A node can also be an automatically generated ' +
|
||||
'anonymous node, or it can be an explicit value or topic that is the same for all records.' +
|
||||
'</p>').appendTo(body);
|
||||
|
||||
$(
|
||||
'<div id="schema-alignment-tabs" class="refine-tabs">' +
|
||||
'<ul>' +
|
||||
'<li><a href="#schema-alignment-tabs-protograph">Skeleton</a></li>' +
|
||||
'<li><a href="#schema-alignment-tabs-preview-mqllike">MQL-like Preview</a></li>' +
|
||||
'<li><a href="#schema-alignment-tabs-preview-tripleloader">TripleLoader Preview</a></li>' +
|
||||
'</ul>' +
|
||||
'<div id="schema-alignment-tabs-protograph">' +
|
||||
'<div class="schema-alignment-dialog-canvas"></div>' +
|
||||
'</div>' +
|
||||
'<div id="schema-alignment-tabs-preview-mqllike" style="display: none;">' +
|
||||
'<div class="schema-alignment-dialog-preview"></div>' +
|
||||
'</div>' +
|
||||
'<div id="schema-alignment-tabs-preview-tripleloader" style="display: none;">' +
|
||||
'<div class="schema-alignment-dialog-preview"></div>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
).appendTo(body);
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype._renderBody = function(body) {
|
||||
var self = this;
|
||||
|
||||
$("#schema-alignment-tabs").tabs();
|
||||
$("#schema-alignment-tabs-preview-mqllike").css("display", "");
|
||||
$("#schema-alignment-tabs-preview-tripleloader").css("display", "");
|
||||
|
||||
this._canvas = $(".schema-alignment-dialog-canvas");
|
||||
this._nodeTable = $('<table></table>').addClass("schema-alignment-table-layout").appendTo(this._canvas)[0];
|
||||
|
||||
for (var i = 0; i < this._protograph.rootNodes.length; i++) {
|
||||
this._nodeUIs.push(new SchemaAlignmentDialog.UINode(
|
||||
this,
|
||||
@ -273,7 +193,60 @@ SchemaAlignmentDialog.prototype._renderBody = function(body) {
|
||||
));
|
||||
}
|
||||
|
||||
this.preview();
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype._save = function(onDone) {
|
||||
var protograph = this.getJSON();
|
||||
|
||||
Refine.postProcess(
|
||||
"freebase",
|
||||
"save-protograph",
|
||||
{},
|
||||
{ protograph: JSON.stringify(protograph) },
|
||||
{},
|
||||
{
|
||||
onDone: function() {
|
||||
theProject.overlayModels.freebaseProtograph = protograph;
|
||||
onDone();
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype._createDialog = function() {
|
||||
var self = this;
|
||||
var frame = $(DOM.loadHTML("freebase", "scripts/dialogs/schema-alignment/schema-alignment-dialog.html"));
|
||||
var elmts = DOM.bind(frame);
|
||||
|
||||
this._level = DialogSystem.showDialog(frame);
|
||||
|
||||
var dismiss = function() {
|
||||
DialogSystem.dismissUntil(self._level - 1);
|
||||
};
|
||||
|
||||
elmts.saveAndCloseButton.click(function() {
|
||||
self._save(dismiss);
|
||||
});
|
||||
elmts.saveAndLoadButton.click(function() {
|
||||
self._save(function() {
|
||||
dismiss();
|
||||
FreebaseExtension.handlers.loadIntoFreebase();
|
||||
});
|
||||
});
|
||||
elmts.resetButton.click(function() {
|
||||
self._reset(null);
|
||||
});
|
||||
elmts.cancelButton.click(dismiss);
|
||||
|
||||
$("#schema-alignment-tabs").tabs();
|
||||
$("#schema-alignment-tabs-preview-mqllike").css("display", "");
|
||||
$("#schema-alignment-tabs-preview-tripleloader").css("display", "");
|
||||
|
||||
this._previewPanes = $(".schema-alignment-dialog-preview");
|
||||
|
||||
this._canvas = $(".schema-alignment-dialog-canvas");
|
||||
this._nodeTable = $('<table></table>').addClass("schema-alignment-table-layout").appendTo(this._canvas)[0];
|
||||
};
|
||||
|
||||
SchemaAlignmentDialog.prototype.getJSON = function() {
|
||||
|
@ -0,0 +1,38 @@
|
||||
<div class="dialog-frame" style="width: 800px;">
|
||||
<div class="dialog-header" bind="dialogHeader">Align to Freebase's Schemas</div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<p class="body-text">
|
||||
The schema alignment skeleton below specifies how the graph-shaped data will get generated
|
||||
from your grid-shaped data and written into Freebase. The cells in each record of your data will
|
||||
get placed into nodes within the skeleton. Configure the skeleton by specifying which
|
||||
column to substitute into which node. A node can also be an automatically generated
|
||||
anonymous node, or it can be an explicit value or topic that is the same for all records.
|
||||
</p>
|
||||
<div id="schema-alignment-tabs" class="refine-tabs">
|
||||
<ul>
|
||||
<li><a href="#schema-alignment-tabs-protograph">Skeleton</a></li>
|
||||
<li><a href="#schema-alignment-tabs-preview-mqllike">MQL-like Preview</a></li>
|
||||
<li><a href="#schema-alignment-tabs-preview-tripleloader">TripleLoader Preview</a></li>
|
||||
</ul>
|
||||
<div id="schema-alignment-tabs-protograph">
|
||||
<div class="schema-alignment-dialog-canvas"></div>
|
||||
</div>
|
||||
<div id="schema-alignment-tabs-preview-mqllike" style="display: none;">
|
||||
<div class="schema-alignment-dialog-preview"></div>
|
||||
</div>
|
||||
<div id="schema-alignment-tabs-preview-tripleloader" style="display: none;">
|
||||
<div class="schema-alignment-dialog-preview"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialog-footer" bind="dialogFooter"><div class="grid-layout layout-normal layout-full"><table><tr>
|
||||
<td>
|
||||
<button class="button" bind="cancelButton">Cancel</button>
|
||||
<button class="button" bind="resetButton">Reset</button>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<button class="button button-primary" bind="saveAndCloseButton">Save & Close</button>
|
||||
<button class="button" bind="saveAndLoadButton">Save & Load</button>
|
||||
</td>
|
||||
</tr></table></div></div>
|
||||
</div>
|
@ -33,9 +33,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
var FreebaseExtension = { handlers: {} };
|
||||
|
||||
FreebaseExtension.handlers.editSchemaAlignment = function(reset) {
|
||||
new SchemaAlignmentDialog(
|
||||
reset ? null : theProject.overlayModels.freebaseProtograph, function(newProtograph) {});
|
||||
FreebaseExtension.handlers.editSchemaAlignment = function() {
|
||||
new SchemaAlignmentDialog(theProject.overlayModels.freebaseProtograph, function(newProtograph) {});
|
||||
};
|
||||
|
||||
FreebaseExtension.handlers.loadIntoFreebase = function() {
|
||||
@ -87,20 +86,15 @@ ExtensionBar.addExtensionMenu({
|
||||
"submenu" : [
|
||||
{
|
||||
"id" : "freebase/schema-alignment",
|
||||
label: "Edit schema aligment skeleton...",
|
||||
label: "Align to Freebase's schemas...",
|
||||
click: function() { FreebaseExtension.handlers.editSchemaAlignment(false); }
|
||||
},
|
||||
{
|
||||
"id" : "freebase/reset-schema-alignment",
|
||||
label: "Reset schema alignment skeleton...",
|
||||
click: function() { FreebaseExtension.handlers.editSchemaAlignment(true); }
|
||||
},
|
||||
{},
|
||||
{
|
||||
"id" : "freebase/load-info-freebase",
|
||||
label: "Load into Freebase...",
|
||||
click: function() { FreebaseExtension.handlers.loadIntoFreebase(); }
|
||||
},
|
||||
{},
|
||||
{
|
||||
"id" : "freebase/browse-load",
|
||||
label: "Browse data load details...",
|
||||
|
@ -33,10 +33,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@import-less url("../theme.less");
|
||||
|
||||
.freebase-loading-dialog-functional-tab-panel {
|
||||
height: 400px !important;
|
||||
}
|
||||
.freebase-loading-tripleloader-data {
|
||||
height: 375px;
|
||||
width: 99%;
|
||||
overflow: auto;
|
||||
overflow: scroll;
|
||||
border: 1px solid #aaa;
|
||||
white-space: pre;
|
||||
padding: 0.3em 0.5em 0.5em 0.5em;
|
||||
@ -44,50 +46,47 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-message {
|
||||
height: 500px;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
border: 1px solid #aaa;
|
||||
padding: 0.3em 0.5em 0.5em 0.5em;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-message h2 {
|
||||
text-align: center;
|
||||
font-size: 150%;
|
||||
margin-top: 3em;
|
||||
font-weight: normal;
|
||||
font-size: 150%;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-message h2 span {
|
||||
font-size; 130%;
|
||||
font-weight: bold;
|
||||
font-size; 130%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-message h4 {
|
||||
text-align: center;
|
||||
font-size: 120%;
|
||||
margin-top: 2em;
|
||||
font-weight: normal;
|
||||
font-size: 120%;
|
||||
margin-top: 2em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-message a {
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.freebase-loading-authorization {
|
||||
margin: 0em 2em;
|
||||
padding: 0.6em 0.8em;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
-moz-border-radius: 0.8em;
|
||||
-webkit-border-radius: 0.8em;
|
||||
margin: 0em 2em;
|
||||
padding: 0.6em 0.8em;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
-moz-border-radius: 0.8em;
|
||||
-webkit-border-radius: 0.8em;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-info {
|
||||
margin-bottom: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.freebase-loading-tripleloader-info textarea {
|
||||
width: 99%;
|
||||
height: 5em;
|
||||
width: 99%;
|
||||
height: 5em;
|
||||
}
|
@ -190,7 +190,7 @@ public class StandardReconConfig extends ReconConfig {
|
||||
|
||||
@Override
|
||||
public int getBatchSize() {
|
||||
return 3;
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,43 +1,52 @@
|
||||
<div class="dialog-frame" style="width: 900px;">
|
||||
<div class="dialog-frame" style="width: 1000px;">
|
||||
<div class="dialog-header" bind="dialogHeader"></div>
|
||||
<div class="dialog-body" bind="dialogBody">
|
||||
<div class="grid-layout layout-normal layout-full"><table>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
This feature helps you find groups of different cell values that might be
|
||||
alternative representations of the same thing. For example, the two strings
|
||||
"New York" and "new york" are very likely to refer to the same concept and
|
||||
just have capitalization differences, and "Gödel" and "Godel" probably refer
|
||||
to the same person.
|
||||
<a href="http://code.google.com/p/google-refine/wiki/Clustering" target="_blank">Find out more ...</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Method:
|
||||
<select bind="methodSelector">
|
||||
Method <select bind="methodSelector">
|
||||
<option selected="true">key collision</option>
|
||||
<option>nearest neighbor</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<div class="binning-controls">Keying Function: <select bind="keyingFunctionSelector">
|
||||
<div class="binning-controls">Keying Function <select bind="keyingFunctionSelector">
|
||||
<option selected="true">fingerprint</option>
|
||||
<option>ngram-fingerprint</option>
|
||||
<option>double-metaphone</option>
|
||||
</select></div>
|
||||
<div class="knn-controls hidden">Distance Function: <select bind="distanceFunctionSelector">
|
||||
<div class="knn-controls hidden">Distance Function <select bind="distanceFunctionSelector">
|
||||
<option selected="true">levenshtein</option>
|
||||
<option>PPM</option>
|
||||
</select></div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="ngram-fingerprint-params" class="function-params hidden">
|
||||
'Ngram Size: <input type="text" value="2" bind="ngramSize" name="ngram-size" size="3" class="param" datatype="int">
|
||||
Ngram Size <input type="text" value="2" bind="ngramSize" name="ngram-size" size="2" class="param" datatype="int">
|
||||
</div>
|
||||
<div class="knn-controls hidden">
|
||||
<span style="margin-right: 1em">Radius: <input type="text" value="1.0" bind="radius" name="radius" size="3" class="param" datatype="float"></span>
|
||||
<span>Block Chars: <input type="text" value="6" bind="ngramBlock" name="blocking-ngram-size" size="3" class="param" datatype="int"></span>
|
||||
<span style="margin-right: 1em">Radius <input type="text" value="1.0" bind="radius" name="radius" size="2" class="param" datatype="float"></span>
|
||||
<span>Block Chars <input type="text" value="6" bind="ngramBlock" name="blocking-ngram-size" size="2" class="param" datatype="int"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td bind="resultSummary" align="right">
|
||||
<td bind="resultSummary" style="text-align:right;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div bind="tableContainer" class="clustering-dialog-table-container"></div>
|
||||
</td>
|
||||
<td bind="facetContainer" width="200"></td>
|
||||
<td colspan="1" bind="facetContainer" width="250"></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
</div>
|
||||
@ -48,8 +57,8 @@
|
||||
<button class="button" bind="deselectAllButton">Deselect All</button>
|
||||
</td>
|
||||
<td class="right" style="text-align: right">
|
||||
<button class="button" bind="applyReClusterButton">Apply & Re-Cluster</button>
|
||||
<button class="button" bind="applyCloseButton">Apply & Close</button>
|
||||
<button class="button button-primary" bind="applyReClusterButton">Merge Selected & Re-Cluster</button>
|
||||
<button class="button" bind="applyCloseButton">Merge Selected & Close</button>
|
||||
<button class="button" bind="closeButton">Close</button>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
@ -386,10 +386,10 @@ ClusteringDialog.prototype._resetFacets = function() {
|
||||
}
|
||||
this._facets = [];
|
||||
|
||||
this._createFacet("Cluster Size", "size");
|
||||
this._createFacet("Row Count", "rowCount");
|
||||
this._createFacet("Value Length Average", "avg");
|
||||
this._createFacet("Value Length Variance", "variance");
|
||||
this._createFacet("# Choices in Cluster", "size");
|
||||
this._createFacet("# Rows in Cluster", "rowCount");
|
||||
this._createFacet("Average Length of Choices", "avg");
|
||||
this._createFacet("Length Variance of Choices", "variance");
|
||||
};
|
||||
|
||||
ClusteringDialog.prototype._createFacet = function(title, property) {
|
||||
|
@ -214,7 +214,7 @@ ReconDialog.prototype._onAddNamespacedService = function() {
|
||||
var namespaceData = elmts.namespaceInput.data("data.suggest");
|
||||
var typeData = elmts.typeInput.data("data.suggest");
|
||||
if (namespaceData) {
|
||||
var url = "http://2.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/namespace_reconcile?namespace=" +
|
||||
var url = "http://4.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/namespace_reconcile?namespace=" +
|
||||
escape(namespaceData.id);
|
||||
if (typeData) {
|
||||
url += "&type=" + typeData.id;
|
||||
|
@ -150,7 +150,7 @@ ReconciliationManager.save = function(f) {
|
||||
ReconciliationManager._rebuildMap();
|
||||
} else {
|
||||
ReconciliationManager.registerStandardService(
|
||||
"http://3.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/reconcile");
|
||||
"http://4.standard-reconcile.dfhuynh.user.dev.freebaseapps.com/reconcile");
|
||||
}
|
||||
},
|
||||
dataType: "json"
|
||||
|
@ -196,10 +196,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"list",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": judgment",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.judgment",
|
||||
"omitError" : true
|
||||
"expression" : 'forNonBlank(cell.recon.judgment, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
|
||||
},
|
||||
{
|
||||
"scroll" : false
|
||||
@ -215,7 +214,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"range",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": best candidate's score",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.best.score",
|
||||
"mode" : "range"
|
||||
@ -232,10 +231,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"list",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": best candidate's types match?",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.features.typeMatch",
|
||||
"omitError" : true
|
||||
"expression" : 'forNonBlank(cell.recon.features.typeMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
|
||||
},
|
||||
{
|
||||
"scroll" : false
|
||||
@ -250,10 +248,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"list",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": best candidate's name match?",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.features.nameMatch",
|
||||
"omitError" : true
|
||||
"expression" : 'forNonBlank(cell.recon.features.nameMatch, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
|
||||
},
|
||||
{
|
||||
"scroll" : false
|
||||
@ -269,7 +266,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"range",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": best candidate's name edit distance",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.features.nameLevenshtein",
|
||||
"mode" : "range"
|
||||
@ -286,7 +283,7 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"range",
|
||||
{
|
||||
"name" : column.name,
|
||||
"name" : column.name + ": best candidate's name word similarity",
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.features.nameWordDistance",
|
||||
"mode" : "range"
|
||||
@ -304,10 +301,9 @@ DataTableColumnHeaderUI.extendMenu(function(column, columnHeaderUI, menu) {
|
||||
ui.browsingEngine.addFacet(
|
||||
"list",
|
||||
{
|
||||
"name" : column.name,
|
||||
"columnName" : column.name,
|
||||
"expression" : "cell.recon.best.type",
|
||||
"omitError" : true
|
||||
"name" : column.name + ": best candidate's types",
|
||||
"columnName" : column.name,
|
||||
"expression" : 'forNonBlank(cell.recon.best.type, v, v, if(isNonBlank(value), "(unreconciled)", "(blank)"))'
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ a img {
|
||||
.sharp_corners_right();
|
||||
}
|
||||
|
||||
.button-disabled, a.button-disabled {
|
||||
.button-disabled, a.button-disabled, .button.button-disabled, a.button.button-disabled {
|
||||
color: #666;
|
||||
border: 1px solid #ddd;
|
||||
background: #f3f3f3;
|
||||
@ -399,3 +399,7 @@ img {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
p.body-text {
|
||||
margin-bottom: 1em;
|
||||
}
|
@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@import-less url("../theme.less");
|
||||
|
||||
.clustering-dialog-table-container {
|
||||
height: 500px;
|
||||
height: 450px;
|
||||
overflow: auto;
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-top: 1px solid @chrome_primary;
|
||||
padding: @padding_normal;
|
||||
border: 1px solid @chrome_primary;
|
||||
background: white;
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
font-size: 1.3em;
|
||||
background: @chrome_secondary;
|
||||
}
|
||||
|
||||
#left-panel .ui-tabs .ui-tabs-panel {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#right-panel {
|
||||
position: fixed;
|
||||
|
@ -41,4 +41,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f9f9f9));
|
||||
background: -moz-linear-gradient(top, #e3e3e3, #f9f9f9);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f9f9f9');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user