gatsby-source-notion-churnotion 1.0.68 → 1.0.69

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ const crypto_1 = __importDefault(require("crypto"));
8
8
  const kiwi_nlp_1 = require("kiwi-nlp");
9
9
  const natural_1 = require("natural");
10
10
  const constants_1 = require("./constants");
11
- const computeCosineSimilarity = require("compute-cosine-similarity");
11
+ const compute_cosine_similarity_1 = __importDefault(require("compute-cosine-similarity"));
12
12
  const vector_similarity_memo = new Map();
13
13
  const md5 = (str) => {
14
14
  const md5 = crypto_1.default.createHash("md5");
@@ -26,7 +26,7 @@ const getMemorizedVectorSimilarity = (v1, v2) => {
26
26
  const calcVectorSimilarity = (v1, v2) => {
27
27
  if (v1.length !== v2.length)
28
28
  throw new Error("Both vector's size must be equal");
29
- return computeCosineSimilarity(v1, v2);
29
+ return (0, compute_cosine_similarity_1.default)(v1, v2) || 0;
30
30
  };
31
31
  const getRelatedPosts = (id, bow_vectors) => {
32
32
  const vector = bow_vectors.get(id);
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.68",
4
+ "version": "1.0.69",
5
5
  "skipLibCheck": true,
6
6
  "license": "0BSD",
7
7
  "main": "./dist/gatsby-node.js",