Closed kennj2016 closed 6 years ago
Please upload your code somewhere, so I can have a look at it.
words = words.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, '').toLowerCase();
let words_except = ['a', 'b', 'p', 'n', 'id', 'uses', 'h', 'is', 'was', 'am', 'are', 'the', 'to', 'be', 'to', 'of', 'and',
'in', 'that', 'have', 'i', 'it', 'for', 'on', 'with', 'he', 'as', 'you',
'do', 'at', 'this', 'but', 'his', 'by', "the", "of", "and", "a", "to", "in", "is", "you", "that", "it", "he", "was", "for",
"on", "are", "as", "with", "his", "they", "I", "at", "be", "this", "have", "from", "or",
"one", "had", "by", "word", "but", "not", "what", "all", "were", "we", "when", "your", "can",
"said", "there", "use", "an", "each", "which", "she", "do", "how", "their", "if",
"will", "up", "other", "about", "out", "many", "then", "them", "these", "so", "some", "her",
"would", "make", "like", "him", "into", "time", "has", "look", "two", "more", "write", "go", "see",
"number", "no", "way", "could", "people", "my", "than", "first", "water", "been", "call", "who",
"oil", "its", "now", "find", "long", "down", "day", "did", "get", "come", "made", "may", "part"
];
words = words.replace(/[^a-zA-Z]+/g, ' ');
let reg_replace = "";
for (var i = words_except.length - 1; i >= 0; i--) {
reg_replace = " " + words_except[i] + " ";
words = words.replace(new RegExp(reg_replace, 'gi'), " ");
}
words = words.replace(/([ ]+)/g, '$1§sep§').split('§sep§');
console.log(words.length);
let wordsCloud = [];
for (let k in words) {
if (words.hasOwnProperty(k)) {
let i = words[k].trim();
wordsCloud[i] = (wordsCloud[i] || 0) + 1;
}
}
for (let k in wordsCloud) {
this.dataTagWords.push([k, wordsCloud[k]]);
}
Can you please upload a full working example on https://jsfiddle.net
Hi, can you let me know what kind of codes do you want to look at? the whole project or just some pages?
Thanks
On Thu, Mar 1, 2018 at 10:53 AM, Sergej Sintschilin < notifications@github.com> wrote:
Please upload your code somewhere, so I can have a look at it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SeregPie/VueWordCloud/issues/29#issuecomment-369636414, or mute the thread https://github.com/notifications/unsubscribe-auth/ATeY-gClYWaHJI5zkFKoWQYEqWLgo0nnks5taBmIgaJpZM4SYdnV .