Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 2538407

Browse files
committed
fixes
1 parent 0f08c36 commit 2538407

File tree

7 files changed

+6
-146
lines changed

7 files changed

+6
-146
lines changed

3-string-tokenization/token_count.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function tokenCount(limit) {
1212
if (err) throw err;
1313
console.log("Counting Tokens...");
1414
var count = wordCount(res.map(r => tokenizer.tokenize(r.text)));
15-
var orderedCount = orderKeys(count);
16-
15+
var orderedCount = orderKeys(count);
16+
1717
console.log("Inserting...");
1818
orderedCount.slice(0, limit).forEach(function(token) {
1919
connection.query('INSERT into token_count SET ?', token);
@@ -27,18 +27,18 @@ function tokenCount(limit) {
2727
function wordCount(xs) {
2828
var rv = new Object();
2929
xs.forEach(function(tokens) {
30-
tokens.forEach(function(token) {
30+
tokens.forEach(function(token) {
3131
if (token in rv) rv[token] += 1;
3232
else rv[token] = 1;
33-
});
33+
});
3434
});
3535
return rv;
3636
}
3737

3838
function orderKeys(object) {
3939
return Object.keys(object)
4040
.sort((a, b) => object[b] - object[a])
41-
.map(key => ({token: key, count: object[key]}));
41+
.map(key => ({token: key, count: object[key]}));
4242
}
4343

4444
function getConnection() {
@@ -53,4 +53,4 @@ function getConnection() {
5353
if (!mle.enabled()) {
5454
tokenCount(100);
5555
}
56-
module.exports.tokenCount = tokenCount;
56+
module.exports.token_count = tokenCount;

4-orm-string-tokenization/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

4-orm-string-tokenization/package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

4-orm-string-tokenization/token_count.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

4-orm-string-tokenization/token_count.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

5-hello-polyglot-world/README.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

5-hello-polyglot-world/hello-polyglot-world.sql

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)