<commit_before>/*
 Handles all of the rewriting tasks
*/
package rewrite

import (
	"github.com/collinvandyck/gesture/util"
	"log"
	"regexp"
	"strings"
)

var (
	linkPrefixes = []*regexp.Regexp{
		makeLinkRe("t.co"),
		makeLinkRe("cl.ly"),
		makeLinkRe("bit.ly"),
		makeLinkRe("j.mp"),
		makeLinkRe("tcrn.ch")}
	expanders       = []expander{expandUrl, expandEmbeddedImages}
	embeddedRePairs = []embeddedRePair{
		makeRePair(`(http://)?(www\.)?cl\.ly[^\s]+`, `a class="embed".*(http://cl\.ly[^"]+)`, 1),
		makeRePair(`(http://)?(www\.)?instagr.?am[^\s]+`, `img class="photo".*(http://[^"]+)`, 1),<commit_msg>update repo pointers<commit_after>/*
 Handles all of the rewriting tasks
*/
package rewrite

import (
	"github.com/sdstrowes/gesture/util"
	"log"
	"regexp"
	"strings"
)

var (
	linkPrefixes = []*regexp.Regexp{
		makeLinkRe("t.co"),
		makeLinkRe("cl.ly"),
		makeLinkRe("bit.ly"),
		makeLinkRe("j.mp"),
		makeLinkRe("tcrn.ch")}
	expanders       = []expander{expandUrl, expandEmbeddedImages}
	embeddedRePairs = []embeddedRePair{
		makeRePair(`(http://)?(www\.)?cl\.ly[^\s]+`, `a class="embed".*(http://cl\.ly[^"]+)`, 1),
		makeRePair(`(http://)?(www\.)?instagr.?am[^\s]+`, `img class="photo".*(http://[^"]+)`, 1),
{'fraction_non_alphanumeric': 0.2530813475760066, 'fraction_numerical': 0.003286770747740345, 'mean_word_length': 4.7725118483412325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2312679', 'n_tokens_mistral': 530, 'n_tokens_neox': 491, 'n_words': 71}