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

SchemaLengthsMacro.groovy (revision 2144)
43 43
		String unit_ursql
44 44
@Field @Option(name="strict_inclusion", usage="Units must be strictly included into corpus matches", widget="Boolean", required=true, def="true")
45 45
		boolean strict_inclusion
46
@Field @Option(name="position_in_matches", usage="Unit distance to structure limit (0 = no selection, 1 = first after limit, -1 = last before limit, etc.)", widget="Integer", required=true, def="0")
47
		int position_in_matches
46 48
@Field @Option(name="sep", usage="choose between the len or freq columns", widget="Separator", metaVar="freq	len", required=true, def="")
47 49
		def sep
48 50
@Field @Option(name="sort_column", usage="choose between the len or freq columns", widget="StringArray", metaVar="freq	len", required=true, def="freq")
......
72 74
		return;
73 75
	}
74 76

  
75
	def schemas = AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size);
77
	def schemas = AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size, strict_inclusion);
76 78

  
77 79
	int nSchemas = 0;
78 80

  
......
84 86
		
85 87
		def units = AnalecUtils.filterElements(debug, allUnites, unit_ursql)
86 88
		
87
		selectedUnits = AnalecUtils.filterUniteByInclusion(debug, units, corpus.getMatches(), strict_inclusion, 0)
89
		selectedUnits = AnalecUtils.filterUniteByInclusion(debug, units, corpus.getMatches(), strict_inclusion, position_in_matches)
88 90
		
89 91
		int nUnites = selectedUnits.size();
90 92

  

Also available in: Unified diff