diff --git a/src/app/panels/tagcloud/editor.html b/src/app/panels/tagcloud/editor.html index d9482cc22..6a3837ed2 100755 --- a/src/app/panels/tagcloud/editor.html +++ b/src/app/panels/tagcloud/editor.html @@ -26,4 +26,11 @@ +
+ + + +
diff --git a/src/app/panels/tagcloud/module.js b/src/app/panels/tagcloud/module.js index a95dd8e73..c42f03d8b 100755 --- a/src/app/panels/tagcloud/module.js +++ b/src/app/panels/tagcloud/module.js @@ -5,6 +5,7 @@ * size :: top N * alignment :: How should I arrange the words in cloud 'horizontal and vertical' or 'Random' * fontScale :: Increase the font scale for all words + * ignoreStopWords :: Whether to Ignore Stop Words */ define([ 'angular', @@ -13,7 +14,8 @@ define([ 'jquery', 'kbn', 'd3', - './d3.layout.cloud' + './d3.layout.cloud', + './stopWords' ], function(angular, app, _, $, kbn, d3) { 'use strict'; @@ -49,6 +51,7 @@ define([ size: 10, alignment: 'vertical and horizontal', fontScale: 1, + ignoreStopWords: false, spyable: true, show_queries: true, error: '', @@ -125,6 +128,9 @@ define([ i++; var count = v[i]; sum += count; + if ($scope.panel.ignoreStopWords && (stopwords.indexOf(term.toLowerCase()) > -1)) { + continue; + } if (term === null) { missing = count; } else { diff --git a/src/app/panels/tagcloud/stopWords.js b/src/app/panels/tagcloud/stopWords.js new file mode 100644 index 000000000..fc48cf26f --- /dev/null +++ b/src/app/panels/tagcloud/stopWords.js @@ -0,0 +1 @@ +var stopwords = ["by", "owing", "anything", "theirs", "of", "here", "they're", "theres", "hed", "contain", "howbeit", "more", "once", "appropriate", "how", "hereby", "above", "isn't", "they", "nothing", "keep", "old", "i'll", "pp", "present", "unlikely", "give", "tends", "truly", "let", "sure", "cant", "you'd", "very", "im", "why", "therefore", "if", "other", "announce", "few", "be", "you've", "herself", "overall", "h", "affecting", "ltd", "ones", "see", "out", "briefly", "these", "largely", "are", "according", "she'll", "k", "really", "ninety", "made", "que", "until", "quite", "unless", "fix", "per", "gotten", "whereby", "lately", "i'm", "should", "might", "potentially", "may", "mrs", "sufficiently", "better", "definitely", "results", "nevertheless", "up", "going", "useful", "recent", "he'll", "ed", "ignored", "ourselves", "perhaps", "always", "immediately", "least", "substantially", "home", "course", "couldn't", "use", "slightly", "to", "towards", "beginnings", "was", "became", "hid", "others", "various", "him", "thanks", "us", "after", "co", "and", "all", "only", "then", "merely", "wish", "seriously", "eighty", "too", "your", "affects", "specifically", "thanx", "hasn't", "refs", "there", "further", "she'd", "as", "ok", "ord", "eight", "pages", "that", "know", "previously", "an", "a's", "inner", "ought", "nonetheless", "everywhere", "want", "accordance", "need", "during", "went", "themselves", "obviously", "et-al", "greetings", "certainly", "five", "million", "past", "hes", "significant", "arise", "most", "whom", "than", "being", "former", "were", "could", "arent", "apparently", "considering", "whenever", "sub", "come", "id", "tell", "it'll", "near", "selves", "twice", "omitted", "anyways", "there's", "anyway", "also", "whereas", "anyhow", "consider", "done", "available", "cause", "wherein", "wasn't", "itd", "seeing", "nearly", "showed", "due", "thoroughly", "that's", "let's", "taken", "related", "within", "o", "indicated", "am", "seen", "primarily", "whereupon", "at", "almost", "presumably", "we're", "seem", "wants", "didn't", "despite", "where", "neither", "thereupon", "upon", "resulting", "maybe", "plus", "over", "able", "everything", "later", "last", "specify", "biol", "them", "for", "having", "toward", "regardless", "followed", "asking", "via", "who", "following", "onto", "concerning", "afterwards", "i'd", "on", "novel", "shall", "where's", "below", "means", "sorry", "appear", "nd", "similar", "name", "necessarily", "now", "respectively", "even", "ca", "it's", "known", "etc", "mean", "somehow", "t's", "well", "becoming", "along", "although", "you're", "ending", "act", "found", "line", "aside", "else", "whither", "willing", "yourself", "currently", "un", "insofar", "indicate", "her", "under", "heres", "seemed", "another", "page", "both", "s", "latter", "never", "thank", "but", "immediate", "okay", "uses", "such", "sometime", "th", "behind", "shes", "non", "been", "three", "proud", "about", "added", "yes", "cannot", "yours", "wouldn't", "thorough", "gets", "soon", "suggest", "edu", "goes", "mg", "throughout", "whence", "everybody", "into", "in", "meanwhile", "shows", "m", "specified", "no", "adj", "trying", "each", "noted", "second", "between", "she", "mustn't", "moreover", "showns", "far", "would", "ever", "tried", "somebody", "his", "certain", "using", "instead", "across", "lest", "described", "take", "'ll", "our", "first", "or", "yourselves", "saw", "third", "must", "looking", "ours", "e", "mug", "whatever", "already", "much", "specifying", "thus", "somewhere", "b", "hereupon", "six", "giving", "because", "just", "kg", "re", "several", "saying", "four", "whoever", "formerly", "example", "one", "i", "won't", "away", "contains", "invention", "right", "best", "causes", "those", "together", "rd", "significantly", "somewhat", "looks", "ref", "j", "have", "affected", "alone", "sometimes", "little", "say", "it'd", "provides", "itself", "thence", "do", "sent", "section", "though", "either", "becomes", "quickly", "exactly", "you'll", "said", "actually", "nos", "ie", "containing", "therein", "indicates", "wonder", "besides", "www", "every", "happens", "necessary", "you", "myself", "own", "end", "thru", "none", "possibly", "whole", "thereby", "resulted", "through", "placed", "inasmuch", "says", "from", "meantime", "show", "ff", "my", "successfully", "beside", "rather", "unfortunately", "eg", "hereafter", "ran", "their", "particular", "think", "shed", "however", "sec", "brief", "c's", "needs", "et", "sup", "himself", "usually", "viz", "someone", "why's", "unto", "hither", "hello", "doesn't", "keeps", "keep keeps", "herein", "different", "hopefully", "is", "seven", "nay", "look", "anywhere", "while", "so", "c'mon", "possible", "information", "with", "allow", "back", "seeming", "outside", "n", "normally", "lets", "it", "they'll", "p", "given", "g", "we'd", "when's", "believe", "beforehand", "can", "go", "nowhere", "off", "liked", "many", "similarly", "thereafter", "particularly", "vs", "relatively", "had", "accordingly", "what's", "still", "somethan", "oh", "what", "stop", "probably", "inc", "downwards", "na", "has", "help", "especially", "make", "put", "latterly", "mostly", "appreciate", "elsewhere", "its", "does", "apart", "which", "noone", "nor", "indeed", "like", "strongly", "they'd", "we've", "namely", "regards", "not", "begins", "poorly", "they've", "forth", "way", "something", "gone", "will", "ain't", "shown", "before", "ah", "ml", "less", "whether", "importance", "me", "furthermore", "com", "this", "makes", "self", "aren't", "getting", "l", "when", "how's", "gives", "who's", "allows", "knows", "again", "value", "reasonably", "ex", "i've", "whose", "c", "tries", "date", "haven't", "except", "can't", "welcome", "likely", "become", "we'll", "corresponding", "changes", "auth", "wherever", "seems", "mr", "did", "r", "secondly", "he'd", "begin", "she's", "new", "readily", "fifth", "otherwise", "don't", "around", "nine", "sensible", "predominantly", "used", "hers", "part", "against", "a", "inward", "qv", "doing", "obtain", "follows", "kept", "obtained", "yet", "effect", "got", "approximately", "km", "without", "next", "came", "hadn't", "consequently", "get", "entirely", "beginning", "q", "same", "serious", "miss", "associated", "shouldn't", "anyone", "run", "abst", "clearly", "thats", "we", "aren", "often", "shan't", "here's", "mainly", "some", "index", "d", "the", "please", "research", "recently", "among", "couldnt", "enough", "hi", "ask", "he's", "beyond", "nobody", "took", "whereafter", "hardly", "comes", "try", "gave", "hence", "hundred", "down", "any", "since", "amongst", "anybody", "everyone", "awfully", "anymore", "zero", "two", "weren't", "he", "regarding", "important", "promptly", "f"];