Skip to content

Commit

Permalink
more linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed May 7, 2023
1 parent f4ad058 commit 1c30413
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions plugins/_experiments/compress/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ let string = fs.readFileSync('../../../plugins/speed/tests/files/freshPrince.txt
// string = "This is my compression test.";


console.log("Size of sample is: " + string.length, '\n\n');
// console.log("Size of sample is: " + string.length, '\n\n');
let compressed = lz.compress(string);
// console.log(string)
// console.log(compressed)
console.log("\n\nSize of compressed sample is: " + compressed.length);
// console.log("\n\nSize of compressed sample is: " + compressed.length);
string = lz.decompress(compressed);


Expand Down
2 changes: 1 addition & 1 deletion plugins/_experiments/compress/src/lz.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-bitwise */
/* eslint-disable */
// Copyright (c) 2013 Pieroxy <[email protected]>
// This work is free. You can redistribute it and/or modify it
// under the terms of the WTFPL, Version 2
Expand Down
1 change: 1 addition & 0 deletions plugins/_experiments/markdown/scratch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import nlp from '../../../src/three.js'
import plg from './src/plugin.js'
nlp.plugin(plg)
Expand Down
2 changes: 1 addition & 1 deletion plugins/_experiments/markdown/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
fromMarkdown: function (md = '') {
let tree = parse(md)
tree = cleanup(tree)
console.dir(tree, { depth: 8 })
// console.dir(tree, { depth: 8 })
return toPlaintexts(tree)
}
}
Expand Down
1 change: 1 addition & 0 deletions plugins/_experiments/sentiment/scratch.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import nlp from '../../../src/three.js'
import plg from './src/plugin.js'
nlp.plugin(plg)
Expand Down
1 change: 1 addition & 0 deletions plugins/_experiments/sentiment/src/emoji.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions plugins/_experiments/sentiment/src/lib.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import { intensifiers, negations } from './data/index.js'

// HELPER FUNCTIONS
Expand Down Expand Up @@ -154,11 +155,11 @@ function chunkArrays(wordsArr, labelsArr) {
tempLocArr.push(element.lastIndexOf('intensifier'));
tempLocArr.push(Math.max(element.lastIndexOf('opinion'), element.lastIndexOf('opinion!')));
// Filter words and labels down to just the items at the indices in tempLocArr
wordsArr2d[index] = wordsArr2d[index].filter(function (element, index) {
return tempLocArr.includes(index);
wordsArr2d[index] = wordsArr2d[index].filter(function (_, i) {
return tempLocArr.includes(i);
});
labelsArr2d[index] = labelsArr2d[index].filter(function (element, index) {
return tempLocArr.includes(index);
labelsArr2d[index] = labelsArr2d[index].filter(function (_, i) {
return tempLocArr.includes(i);
});
});
// chunkReturnObj = {'word_chunks': wordsArr2d, 'label_chunks': labelsArr2d};
Expand Down
1 change: 1 addition & 0 deletions plugins/_experiments/sentiment/test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import nlp from '../../../src/three.js'
import plg from './src/plugin.js'
nlp.plugin(plg)
Expand Down
5 changes: 1 addition & 4 deletions scripts/coreference/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ list.forEach(str => {
}
})
if (Object.keys(out).length) {
console.log(JSON.stringify([
str,
out
], null, 2) + ',\n')
// console.log(JSON.stringify([str, out], null, 2) + ',\n')
}
})

0 comments on commit 1c30413

Please sign in to comment.