Revision 2167 tmp/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/SchemaLengthsMacro.groovy

SchemaLengthsMacro.groovy (revision 2167)
74 74
		return;
75 75
	}
76 76

  
77
	//println([debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size, strict_inclusion])
77 78
	def schemas = AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size, strict_inclusion);
78 79

  
79 80
	int nSchemas = 0;
......
97 98

  
98 99
		lens[nUnites] = lens[nUnites] + 1;
99 100
		String value = schema.getProp(schema_property_display);
100
		if (value.contains(",")) value = "\"$value\""
101
		//if (value.contains(",")) value = "\"$value\""
101 102
		lensnames[nUnites] << value
102 103
		nSchemas++;
103 104
	}
......
136 137
	println "Index:\nlen\tfreq\tcfreq"
137 138
	int nShown = 0;
138 139
	for( def it : slens) {
139
		println it.key+"	"+it.value+"	"+(cfreq+=it.value)+"	"+lensnames[it.key].join(", ")
140
		def names = lensnames[it.key]
141
		names = names.sort()
142
		println it.key+"	"+it.value+"	"+(cfreq+=it.value)+"	\""+names.join("\", \"")+"\""
140 143
		nShown++
141 144
		if (max_lines > 0 && nShown >= max_lines) {
142 145
			println "... (${slens.size() - max_lines})"

Also available in: Unified diff