Révision 3410

TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy (revision 3410)
165 165
		String projectionsParameterValue = project.getTextualPlan("Projections").trim()
166 166
		projectionsParameterValue = projectionsParameterValue.replace("\n", "\t")
167 167
		def projectionsParameter = projectionsParameterValue.split("\t");
168
		if (projectionsParameterValue.length() > 0) {
168
		if (projectionsParameterValue.length() > 0 && projectionsParameterValue.contains("->")) {
169 169
			for (def projection : projectionsParameter) {
170 170
				if (!projection.contains("->")) continue;
171 171
				String[] fromTo = projection.split("->", 2)
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy (revision 3410)
184 184
		String projectionsParameterValue = module.project.getTextualPlan("Projections").trim()
185 185
		projectionsParameterValue = projectionsParameterValue.replace("\n", "\t")
186 186
		def projectionsParameter = projectionsParameterValue.split("\t");
187
		if (projectionsParameterValue.length() > 0) {
187
		if (projectionsParameterValue.length() > 0 && projectionsParameterValue.contains("->")) {
188 188
			for (def projection : projectionsParameter) {
189 189
				if (!projection.contains("->")) continue;
190 190
				
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/PrepareAFVOIXOFFCorpusMacro.groovy (revision 3410)
43 43
	, "topicColumns": "Date de diffusion"
44 44
	, "metadataColumns": "id;Titre propre;Date de diffusion;Identifiant de la notice;Notes du titre;Type de date;Durée;Genre;Langue VO / VE;Nature de production;Producteurs (Aff.);Thématique;Nom fichier segmenté (info);antract_video;antract_debut;antract_fin;antract_duree;antract_tc_type;antract_tc_date;Résumé;Séquences;Descripteurs (Aff. Lig.);Générique (Aff. Lig.)"
45 45
	, "metadataColumnsGroups": "secondary;metadata;metadata;metadata;metadata;metadata;metadata;metadata;metadata;metadata;metadata;metadata;secondary;secondary;secondary;secondary;secondary;secondary;secondary;text;text;text;text"
46
	, "sectionsMergeActivationThreashold":1.0
47
	, "turnsMergeActivationThreashold":0.1
46 48
	, "debug":debug])
47 49

  
48 50
//copy the emissions file in the source directory
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/AddSectionsFromTableMacro.groovy (revision 3410)
36 36
		
37 37
@Field @Option(name="fixSectionsLimits", usage="Correction des limites de sections du tableau de metadonnees", widget="Boolean", required=true, def="true")
38 38
		def fixSectionsLimits
39
		
40
@Field @Option(name="sectionsMergeActivationThreashold", usage="marge d'erreur de corrections des limites de sections", widget="Float", required=true, def="1.0")
41
		def sectionsMergeActivationThreashold
42
		
43
@Field @Option(name="turnsMergeActivationThreashold", usage="marge d'erreur de corrections des limites de tours", widget="Float", required=true, def="0.1")
44
		def turnsMergeActivationThreashold
39 45

  
40 46
@Field @Option(name="debug", usage="show debug messages", widget="String", required=true, def="false")
41 47
		def debug
......
187 193
			if (debug) println "Fixing sections of $id"
188 194
			for (int iSection = 1 ; iSection < sections.size() ; iSection++) {
189 195
				//println sections[iSection]
190
				if (sections[iSection][0] - sections[iSection - 1][1] > 0.1) {
196
				if (sections[iSection][0] - sections[iSection - 1][1] > sectionsMergeActivationThreashold) {
191 197
					if (debug) println "s=$iSection start <- end : "+sections[iSection][0]+ " <- "+sections[iSection - 1][1]
192 198
					sections[iSection][0] = sections[iSection - 1][1] // fix the start time with the previous section end time
193 199
				}
......
274 280
							def start2 = Float.parseFloat(c.@startTime)
275 281
							def end2 = Float.parseFloat(c.@endTime)
276 282
							
277
							if (start2 > sections[iSection][1] && Math.abs(start2 - sections[iSection][1]) > 0.1) {
283
							if (start2 > sections[iSection][1] && Math.abs(start2 - sections[iSection][1]) > turnsMergeActivationThreashold) {
278 284
								if (debug) println "cut with w at [$start2, $end2] for section "+sections[iSection][1]
279 285
								newTurnKaNode = new Node(trsSection, "Turn", ["startTime":""+start2, "endTime":""+turn.@endTime, "speaker":turn.@speaker])
280 286
								if (debug) newTurnKaNode.@created = "yes"
......
289 295
							def start2 = Float.parseFloat(c.@time)
290 296
							def end2 = Float.parseFloat(c.@time)
291 297
							
292
							if (start2 > sections[iSection][1] && Math.abs(start2 - sections[iSection][1]) > 0.1) {
298
							if (start2 > sections[iSection][1] && Math.abs(start2 - sections[iSection][1]) > turnsMergeActivationThreashold) {
293 299
								if (debug) println "cut with Sync at [$start2, $end2] for section "+sections[iSection][1]
294 300
								newTurnKaNode = new Node(trsSection, "Turn", ["startTime":""+start2, "endTime":""+turn.@endTime, "speaker":turn.@speaker])
295 301
								if (debug) newTurnKaNode.@created = "yes"

Formats disponibles : Unified diff