<commit_before>// Initialization.

// class_names is the unparsed text pulled in from GOLD about each class (including its dept., num., and name).
var class_names = new Array();
// meeting_times is the unparsed text about all meeting times.
var meeting_times = new Array();
// class_times is the parsed values for the meeting times of the all the classes. It is an array of arrays, with a top-level element for each class.
var class_times = new Array();
// instructors is an array for the professors of each class.
var instructors = new Array();
// Counter.
var count = 0;

// Get all the tags of class "clcellprimaryalt". Class names seem to always be of this class.
var classes = document.getElementsByClassName("clcellprimaryalt");

// Loop through all those tags.
for (var i = 0; i < classes.length; i++) {
	// We only want divs, those are the class name tags. Ignore everything else.
	if (classes[i].tagName.toLowerCase() == "div") {
		// Get the meeting times for each class. They seem to be in an element with id "ctl00_pageContent_CourseList_ctl0X_MeetingTimesList"
		//    where X is the index of the course in GOLD table, indexed from 1 (i.e. 1, 2, 3, 4, etc).
		var meeting_time = document.getElementById("ctl00_pageContent_CourseList_ctl0" + (count + 1) + "_MeetingTimesList");
		// Add that to the meeting_times array, and add the class name to the class_names array.
		meeting_times[count] = meeting_time;
		
		// Get the instructor from the page.
		var instructor = document.getElementById("ctl00_pageContent_CourseList_ctl0" + (count + 1) + "_InstructorList");
		
		// Check f we found instructors.		
		if (instructor) {
			// If we did, get all the instructors from the table. The elements they're in may be clcellprimary or clcellprimaryalt, so handle both.
			var currentinstructors = instructor.getElementsByClassName("clcellprimary");
			var currentinstructorsstr = new Array();
			if (currentinstructors.length == 0){
				currentinstructors = instructor.getElementsByClassName("clcellprimaryalt");
			}
			
			// Go through all the instructors, and get their string representation, trimmed.
			for (var j = 0; j < currentinstructors.length; j++) {
						currentinstructorsstr[j] = currentinstructors[j].textContent.trimLeft().trimRight();
			}
			
			// Add the instructor array for this course, trimmed, to the main instructors array.
			instructors[count] = currentinstructorsstr;
		}
				
		class_names[count++] = classes[i].textContent;
	}
}<commit_msg>Fixed tags for locations and instructors<commit_after>// Initialization.

// class_names is the unparsed text pulled in from GOLD about each class (including its dept., num., and name).
var class_names = new Array();
// meeting_times is the unparsed text about all meeting times.
var meeting_times = new Array();
// class_times is the parsed values for the meeting times of the all the classes. It is an array of arrays, with a top-level element for each class.
var class_times = new Array();
// instructors is an array for the professors of each class.
var instructors = new Array();
// Counter.
var count = 0;

// Get all the tags of class "clcellprimaryalt". Class names seem to always be of this class.
var classes = document.getElementsByClassName("clcellprimaryalt");

// Loop through all those tags.
for (var i = 0; i < classes.length; i++) {
	// We only want divs, those are the class name tags. Ignore everything else.
	if (classes[i].tagName.toLowerCase() == "div") {
		// Get the meeting times for each class. They seem to be in an element with id "pageContent_CourseList_MeetingTimesList_X"
		//    where X is the index of the course in GOLD table, indexed from 0 (i.e. 0, 1, 2, 3, 4, etc).
		var meeting_time = document.getElementById("pageContent_CourseList_MeetingTimesList_" + count);

		// Add that to the meeting_times array, and add the class name to the class_names array.
		meeting_times[count] = meeting_time;
		
		// Get the instructor from the page.
		var instructor = document.getElementById("pageContent_CourseList_InstructorList_" + count);
		
		// Check f we found instructors.		
		if (instructor) {
			// If we did, get all the instructors from the table. The elements they're in may be clcellprimary or clcellprimaryalt, so handle both.
			var currentinstructors = instructor.getElementsByClassName("clcellprimary");
			var currentinstructorsstr = new Array();
			if (currentinstructors.length == 0){
				currentinstructors = instructor.getElementsByClassName("clcellprimaryalt");
			}
			
			// Go through all the instructors, and get their string representation, trimmed.
			for (var j = 0; j < currentinstructors.length; j++) {
						currentinstructorsstr[j] = currentinstructors[j].textContent.trimLeft().trimRight();
			}
			
			// Add the instructor array for this course, trimmed, to the main instructors array.
			instructors[count] = currentinstructorsstr;
		}
				
		class_names[count++] = classes[i].textContent;
	}
}
{'fraction_non_alphanumeric': 0.0933765444601985, 'fraction_numerical': 0.006076564715414219, 'mean_word_length': 3.938, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '103475', 'n_tokens_mistral': 1543, 'n_tokens_neox': 1377, 'n_words': 568}