<commit_before>var html = "";
var synArray= "";

document.addEventListener('keydown', handleKeypress, false);

function handleKeypress(){
	if (event.keyCode == 84){
		getSelectionHtml();
		
		//begin splitter
		var words = html.split(" ");
		console.log(words);
		var newWords = words.slice(0);
		
		//round 2
		
		for (var i =0; i < words.length; ++i) {
			if (words[i] != ""){
				var site = "http://api.wolframalpha.com/v2/query?appid=J5UPVW-4RLV6H2X3E&input=synonym%20" + words[i] + "&format=plaintext&includepodid=Synonyms:WordData";
				$.get(
					site,
					function(data) {
						var text = new XMLSerializer().serializeToString(data);
						var syns = text.match(/\<plaintext>.*\|/) + ">";
						synArray = syns.split(">");
						synArray = synArray[1].split(" ");
						alert(synArray[0]);
					}
				);
				html = "";
			}
		}
	}
}

function getSelectionHtml() {
    if (typeof window.getSelection != "undefined") {
        var sel = window.getSelection();
        if (sel.rangeCount) {
            var container = document.createElement("div");<commit_msg>iteration is Random part 2<commit_after>var html = "";
var synArray= "";

document.addEventListener('keydown', handleKeypress, false);

function handleKeypress(){
	if (event.keyCode == 84){
		getSelectionHtml();
		
		//begin splitter
		var words = html.split(" ");
		console.log(words);
		var newWords = new Array();
		
		//round 2
		var temp' 
		for (var i =0; i < words.length; ++i) {
			if (words[i] != ""){
				var site = "http://api.wolframalpha.com/v2/query?appid=J5UPVW-4RLV6H2X3E&input=synonym%20" + words[i] + "&format=plaintext&includepodid=Synonyms:WordData";
				$.get(
					site,
					function(data) {
						var text = new XMLSerializer().serializeToString(data);
						var syns = text.match(/\<plaintext>.*\|/) + ">";
						synArray = syns.split(">");
						synArray = synArray[1].split(" ");
						newWords[i] =(synArray[0]);
					}
				);
				html = "";
			}
		}
		var newSentence = "";
		for (var i = 0; i < newWords.length; ++i) {
			newSentence = newSentence + newWords[i] + " ";
		}
		alert(newSentence);
	}
}

function getSelectionHtml() {
    if (typeof window.getSelection != "undefined") {
        var sel = window.getSelection();
        if (sel.rangeCount) {
            var container = document.createElement("div");
{'fraction_non_alphanumeric': 0.1769031141868512, 'fraction_numerical': 0.013408304498269897, 'mean_word_length': 3.057894736842105, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1281377', 'n_tokens_mistral': 954, 'n_tokens_neox': 793, 'n_words': 156}