Skip to content

Instantly share code, notes, and snippets.

@simplerethink
simplerethink / Search Query Mining Tool.js
Created March 29, 2022 16:26 — forked from BrainlabsDigital/Search Query Mining Tool.js
Search Query Mining Tool script to calculate the performance of n-grams
/**
*
* Search Query Mining Tool
*
* This script calculates the contribution of each word or phrase found in the
* search query report and outputs a report into a Google Doc spreadsheet.
*
* Version: 2.2
* Updated 2015-09-17: replacing 'KeywordText' with 'Criteria'
* Updated 2016-10-11: replacing 'ConvertedClicks' with 'Conversions'
@simplerethink
simplerethink / shakespeare-ngrams-cli-ack.md
Created March 31, 2022 09:37 — forked from dannguyen/shakespeare-ngrams-cli-ack.md
How to tokenize and create n-grams in Shakespeare from the command-line

Creating Shakespearean n-grams with just the command-line and regexes

This is a quick example showing how to use regexes to find tri-grams in Shakespeare...well, 570,872 of them, anyway, if we do some basic filtering of non-dialogue.

Though tokenization and n-grams should typically be done using a proper natural language processing framework, it's possible to do in a jiffy from the command-line, using standard Unix tools and ack, the better-than-grep utility.

What are n-grams?

@simplerethink
simplerethink / search.js
Created April 6, 2022 14:07 — forked from arielsalminen/search.js
Demo of how we create a JSON based search index and search functionality for Nord Design System’s Eleventy based documentation at https://nordhealth.design/
/* eslint-disable no-undef */
;(function (window, document) {
"use strict"
/**
* The Nord Documentation object
*
* @constructor
*/
function NordDocs() {
@simplerethink
simplerethink / backup.sh
Created February 22, 2024 18:21 — forked from jarulsamy/backup.sh
Linux backup home directory daily.
#!/usr/bin/env bash
#
# Backup home directory
#
#
set -o errexit
set -o nounset
set -o pipefail