gatsby-source-notion-churnotion 1.0.98 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/onPostBootstrap.js +5 -15
- package/package.json +1 -2
package/dist/onPostBootstrap.js
CHANGED
@@ -8,16 +8,9 @@ const crypto_1 = __importDefault(require("crypto"));
|
|
8
8
|
const natural_1 = require("natural");
|
9
9
|
const constants_1 = require("./constants");
|
10
10
|
const compute_cosine_similarity_1 = __importDefault(require("compute-cosine-similarity"));
|
11
|
-
const
|
12
|
-
const
|
13
|
-
|
14
|
-
const result = await manager.process("ko", doc);
|
15
|
-
if (!result.entities) {
|
16
|
-
return [];
|
17
|
-
}
|
18
|
-
return result.entities
|
19
|
-
.map((entity) => entity.utteranceText)
|
20
|
-
.filter((text) => text.length > 1);
|
11
|
+
const tokenizer = new natural_1.WordTokenizer();
|
12
|
+
const getTokens = (doc) => {
|
13
|
+
return tokenizer.tokenize(doc);
|
21
14
|
};
|
22
15
|
const vector_similarity_memo = new Map();
|
23
16
|
const md5 = (str) => {
|
@@ -68,11 +61,8 @@ const getTextFromRawText = async (doc) => {
|
|
68
61
|
.replace(/http[^ ]+/g, "")
|
69
62
|
.replace(/[\#\!\(\)\*\_\[\]\|\=\>\+\`\:\-]/g, "");
|
70
63
|
};
|
71
|
-
const getSpaceSeparatedDoc =
|
72
|
-
|
73
|
-
return "";
|
74
|
-
}
|
75
|
-
const tokens = await getTokens(doc);
|
64
|
+
const getSpaceSeparatedDoc = (doc) => {
|
65
|
+
const tokens = getTokens(doc);
|
76
66
|
return tokens.join(" ");
|
77
67
|
};
|
78
68
|
const onPostBootstrap = async ({ actions, getNode, getNodesByType, createNodeId, reporter, cache }, options) => {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "gatsby-source-notion-churnotion",
|
3
3
|
"description": "Gatsby plugin that can connect with One Notion Database RECURSIVELY using official API",
|
4
|
-
"version": "1.0
|
4
|
+
"version": "1.1.0",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|
@@ -48,7 +48,6 @@
|
|
48
48
|
"metascraper-url": "^5.45.25",
|
49
49
|
"natural": "^8.0.1",
|
50
50
|
"node-fetch": "^3.3.2",
|
51
|
-
"node-nlp": "^5.0.0-alpha.4",
|
52
51
|
"notion-to-md": "^3.1.1",
|
53
52
|
"notion-types": "^7.1.5",
|
54
53
|
"typescript": "^5.7.2"
|