slidng groupedhttps://jsfiddle.net/aha00a/emgh4uox/13/
없길래 직접 만들어봄. 다만 grouped는 Lodash의 chunk(github)하고 같은 거라고 함. --2019-07-22
sliding
const sliding = (array, size) => array.map((v, i, a) => a.slice(i, i + size)).filter(v => v.length === size);sliding(range(0, 10), 4)
[[0,1,2,3],[1,2,3,4],[2,3,4,5],[3,4,5,6],[4,5,6,7],[5,6,7,8],[6,7,8,9]]
groupedconst grouped = (array, size) => array.map((v, i, a) => i % size ? null : a.slice(i, i + size)).filter(v => v);
grouped(range(0, 10), 2)
[[0,1],[2,3],[4,5],[6,7],[8,9]]
grouped(range(0, 10), 3)
[[0,1,2],[3,4,5],[6,7,8],[9]]
3.1. Backlinks3.2. Similar PagesSimilar pages by cosine similarity. Words after page name are term frequency.
|