<commit_before>define(['dojo/_base/declare',
			'require', 
			'dojox/gfx', 
			'dojox/gfx/utils', 
			'dojox/gfx/matrix', 
			'dojo/_base/lang', 
			'dojo/dom-construct', 
			'dojo/_base/array', 
			'dojo/_base/Color'
], function(declare, require, gfx, gfxUtils, gfxMatrix, lang, construct, array, Color) {
	
	return declare(require.module.mid, null, {
		//	summary:
		//		This utility converts an svg xml to dojox gfx shapes.
		//		It further parses the group and style nodes output from the output of the dojox/xml/DomParser utility.
		//			
		//		To extend this parser:
		//			1. Read the SVG spec: http://www.w3.org/TR/SVG/expanded-toc.html
		//			2. Create properties to be added from the svg spec that are in the xml input
		//			3. Add properties to the shape object if necessary 
		//			4. Create a parser to handle your shape if one doesn't exist, and map the properties
		//			5. Modify the rendering bridge (e.g. svg.js) to handle the new properties
		//			6. Modify the utils serialize and deserialize if necessary to handle the new properties
		//			7. Create patch files for any changes to the dojox gfx _base, svg, shape, or utils.
		
		surface : null,
		height : null,
		width : null,
		overflow : null,
		_defs : null, 
		_surface : null,
		
		constructor: function(args) {
			this._defs = {};

			this.height = args.height;
			this.width = args.width;
			this.overflow = args.overflow;
			
			if (args.surface) {
				this.surface = args.surface;
			} else {
				this.surface = construct.create("div");
			}
			this._surface = gfx.svg.createSurface(this.surface, this.width, this.height);
		},

		parse: function(obj, group) {
			if (obj.nodeName == "svg") {
				if (obj.attributes instanceof Array) {
					array.forEach(obj.attributes, function(attr) {
						var nodeName = attr.nodeName.replace("-", "").replace(":", "");
						obj[nodeName] = attr.nodeValue;	<commit_msg>Update Svg2Gfx.js<commit_after>define(['dojo/_base/declare',
	'require', 
	'dojox/gfx', 
	'dojox/gfx/utils', 
	'dojox/gfx/matrix', 
	'dojo/_base/lang', 
	'dojo/dom-construct', 
	'dojo/_base/array', 
	'dojo/_base/Color'
], function(declare, require, gfx, gfxUtils, gfxMatrix, lang, construct, array, Color) {
	
	return declare(require.module.mid, null, {
		//   summary:
		//	This utility converts an svg xml to dojox gfx shapes.
		//	It further parses the group and style nodes output from the output of the dojox/xml/DomParser utility.
		//			
		//	To extend this parser:
		//		1. Read the SVG spec: http://www.w3.org/TR/SVG/expanded-toc.html
		//		2. Create properties to be added from the svg spec that are in the xml input
		//		3. Add properties to the shape object if necessary 
		//		4. Create a parser to handle your shape if one doesn't exist, and map the properties
		//		5. Modify the rendering bridge (e.g. svg.js) to handle the new properties
		//		6. Modify the utils serialize and deserialize if necessary to handle the new properties
		//		7. Create patch files for any changes to the dojox gfx _base, svg, shape, or utils.
		
		surface : null,
		height : null,
		width : null,
		overflow : null,
		_defs : null, 
		_surface : null,
		
		constructor: function(args) {
			this._defs = {};

			this.height = args.height;
			this.width = args.width;
			this.overflow = args.overflow;
			
			if (args.surface) {
				this.surface = args.surface;
			} else {
				this.surface = construct.create("div");
			}
			this._surface = gfx.svg.createSurface(this.surface, this.width, this.height);
		},

		parse: function(obj, group) {
			if (obj.nodeName == "svg") {
				if (obj.attributes instanceof Array) {
					array.forEach(obj.attributes, function(attr) {
						var nodeName = attr.nodeName.replace("-", "").replace(":", "");
						obj[nodeName] = attr.nodeValue;	
{'fraction_non_alphanumeric': 0.1277895855472901, 'fraction_numerical': 0.004516471838469713, 'mean_word_length': 2.9096573208722742, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '4075566', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1261, 'n_words': 383}