From 0c4b79c53a3fcce3c030e53bd9c9fefade845af1 Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Tue, 9 Mar 2010 20:58:51 +0000 Subject: [PATCH] more polish on the clustering dialog git-svn-id: http://google-refine.googlecode.com/svn/trunk@260 7d457c2a-affb-35e4-300a-418c747d4874 --- .../clustering/binning/BinningClusterer.java | 2 +- .../binning/NGramFingerprintKeyer.java | 2 +- .../clustering/knn/kNNClusterer.java | 2 +- .../dialogs/facet-based-edit-dialog.js | 42 ++++++++++++++----- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/clustering/binning/BinningClusterer.java b/src/main/java/com/metaweb/gridworks/clustering/binning/BinningClusterer.java index 60ed36f6e..b83ca7606 100644 --- a/src/main/java/com/metaweb/gridworks/clustering/binning/BinningClusterer.java +++ b/src/main/java/com/metaweb/gridworks/clustering/binning/BinningClusterer.java @@ -55,7 +55,7 @@ public class BinningClusterer extends Clusterer { _params = new Object[1]; _params[0] = size; } catch (JSONException e) { - //Gridworks.warn("no ngram size specified, using default"); + //Gridworks.warn("No params specified, using default"); } } } diff --git a/src/main/java/com/metaweb/gridworks/clustering/binning/NGramFingerprintKeyer.java b/src/main/java/com/metaweb/gridworks/clustering/binning/NGramFingerprintKeyer.java index 4b3fe11f5..bfdc84a77 100644 --- a/src/main/java/com/metaweb/gridworks/clustering/binning/NGramFingerprintKeyer.java +++ b/src/main/java/com/metaweb/gridworks/clustering/binning/NGramFingerprintKeyer.java @@ -9,7 +9,7 @@ public class NGramFingerprintKeyer extends Keyer { static final Pattern alphanum = Pattern.compile("\\p{Punct}|\\p{Cntrl}|\\p{Space}"); public String key(String s, Object... o) { - int ngram_size = 1; + int ngram_size = 2; if (o != null && o.length > 0 && o[0] instanceof Number) { ngram_size = (Integer) o[0]; } diff --git a/src/main/java/com/metaweb/gridworks/clustering/knn/kNNClusterer.java b/src/main/java/com/metaweb/gridworks/clustering/knn/kNNClusterer.java index 41f049da6..98eed7a01 100644 --- a/src/main/java/com/metaweb/gridworks/clustering/knn/kNNClusterer.java +++ b/src/main/java/com/metaweb/gridworks/clustering/knn/kNNClusterer.java @@ -73,7 +73,7 @@ public class kNNClusterer extends Clusterer { JSONObject params = o.getJSONObject("params"); _radius = params.getDouble("radius"); } catch (JSONException e) { - Gridworks.warn("No parameters found, using defaults"); + //Gridworks.warn("No parameters found, using defaults"); } } diff --git a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js b/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js index f675c4a4b..0b8e7fd40 100644 --- a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js +++ b/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js @@ -18,7 +18,14 @@ FacetBasedEditDialog.prototype._createDialog = function() { var header = $('
').addClass("dialog-header").text("Cluster & Edit column " + this._columnName).appendTo(frame); var body = $('
').addClass("dialog-body").appendTo(frame); - var footer = $('
').addClass("dialog-footer").appendTo(frame); + var footer = $( + '' + ).appendTo(frame); var html = $( '
' + @@ -51,7 +58,7 @@ FacetBasedEditDialog.prototype._createDialog = function() { '' + '' + '' + '