<commit_before>import React, {Component, PropTypes} from 'react'
import cx from 'classnames'
import semesterName from '../helpers/semester-name'
import {shrinkDept} from '../area-tools/convert-department'

import './expression--course.scss'

export default class CourseExpression extends Component {
	static propTypes = {
		_result: PropTypes.bool,
		department: PropTypes.arrayOf(PropTypes.string).isRequired,
		international: PropTypes.bool,
		lab: PropTypes.bool,
		level: PropTypes.number,
		number: PropTypes.number,
		section: PropTypes.string,
		semester: PropTypes.number,
		style: PropTypes.object,
		year: PropTypes.number,
	};

	render() {
		const department = this.props.department.map(shrinkDept).join('/')

		const international = this.props.international &&
			<span className='course--international'>I</span>
		const lab = this.props.lab &&
			<span className='course--lab'>L</span>

		const section = this.props.section && this.props.section !== '*' &&
			<span className='course--section'>[{this.props.section}]</span>
<commit_msg>use lodash.map in expr-course<commit_after>import React, {Component, PropTypes} from 'react'
import cx from 'classnames'
import semesterName from '../helpers/semester-name'
import {shrinkDept} from '../area-tools/convert-department'
import map from 'lodash/collection/map'

import './expression--course.scss'

export default class CourseExpression extends Component {
	static propTypes = {
		_result: PropTypes.bool,
		department: PropTypes.arrayOf(PropTypes.string).isRequired,
		international: PropTypes.bool,
		lab: PropTypes.bool,
		level: PropTypes.number,
		number: PropTypes.number,
		section: PropTypes.string,
		semester: PropTypes.number,
		style: PropTypes.object,
		year: PropTypes.number,
	};

	render() {
		const department = map(this.props.department, shrinkDept).join('/')

		const international = this.props.international &&
			<span className='course--international'>I</span>
		const lab = this.props.lab &&
			<span className='course--lab'>L</span>

		const section = this.props.section && this.props.section !== '*' &&
			<span className='course--section'>[{this.props.section}]</span>

{'fraction_non_alphanumeric': 0.1419953596287703, 'fraction_numerical': 0.0, 'mean_word_length': 4.795698924731183, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6798500', 'n_tokens_mistral': 695, 'n_tokens_neox': 645, 'n_words': 144}