瀏覽代碼

Suppr optimizer

Loquicom 5 年之前
父節點
當前提交
b223f92136
共有 2 個文件被更改,包括 1 次插入28 次删除
  1. 0 26
      optimizer.js
  2. 1 2
      package.json

+ 0 - 26
optimizer.js

@@ -1,26 +0,0 @@
-const readline = require('readline');
-const file = require('./src/file');
-const fs = file.fs;
-
-const path = './data/opti/';
-const source = './data/preprocess.ppf';
-let data = {};
-
-file.makedir(path);
-
-const reader = readline.createInterface({
-    input: fs.createReadStream(source)
-});
-reader.on('line', (line) => {
-    const group = JSON.parse(line);
-    group.forEach(auth => {
-        let coauth = JSON.parse(line);
-        coauth.splice(coauth.indexOf(auth), 1);
-        coauth.forEach(elt => {
-            file.append(path + auth, elt + '\n');
-        });
-    });
-});
-reader.on('close', () => {
-    console.log('Fin');
-});

+ 1 - 2
package.json

@@ -21,8 +21,7 @@
     "preprocess": "node main.js prepare ./data/dblp.xml",
     "exemple": "node main.js --name \"Fabien Delorme\"",
     "process": "node main.js --process ./data/dblp.xml",
-    "test": "node main.js -n \"Nathalie Chetcuti-Sperandio\" -v",
-    "opti": "node optimizer.js"
+    "test": "node main.js -n \"Nathalie Chetcuti-Sperandio\" -v"
   },
   "engines": {
     "node": ">=10.12.0"