Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSVOSummaryMacro.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSVOSummaryMacro.groovy	(revision 0)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSVOSummaryMacro.groovy	(revision 2335)
@@ -0,0 +1,116 @@
+// Copyright © 2019 ENS de Lyon, CNRS, University of Franche-Comté
+// Licensed under the terms of the GNU General Public License (http://www.gnu.org/licenses)
+// @author mdecorde
+// STANDARD DECLARATIONS
+package org.txm.macro.tiger.exploit
+
+import groovy.transform.Field
+
+import org.txm.searchengine.core.SearchEnginesManager
+import org.txm.searchengine.cqp.corpus.*
+import org.txm.searchengine.ts.TIGERSearchEngine
+import org.txm.utils.TableReader
+
+def scriptName = this.class.getSimpleName()
+
+def selection = []
+for (def s : corpusViewSelections) {
+	if (s instanceof CQPCorpus) selection << s
+	else if (s instanceof Partition) selection.addAll(s.getParts())
+}
+
+if (selection.size() == 0) {
+	println "** $scriptName: please select a Corpus or a Partition in the Corpus view: "+corpusViewSelections
+	return false
+} else {
+	for (def c : selection) c.compute(false)
+}
+
+@Field @Option(name="query_table_file", usage="A Full TIGERSearch query", widget="FileOpen", required=true, def="queries.ods")
+		def query_table_file
+@Field @Option(name="count_subgraph", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
+		def count_subgraph
+@Field @Option(name="sujet_value", usage="", widget="String", required=true, def=".*subj.*")
+		def sujet_value
+@Field @Option(name="object_value", usage="", widget="String", required=true, def=".*obj.*")
+		def object_value
+@Field @Option(name="proposition_type", usage="", widget="String", required=true, def=".*")
+		def proposition_type
+@Field @Option(name="proposition_subordonee", usage="", widget="StringArray", metaVar="Sans	Seulement	Avec", required=true, def="Sans")
+		def proposition_subordonee
+@Field @Option(name="coordinations", usage="", widget="StringArray", metaVar="Sans	Seulement	Avec", required=true, def="Sans")
+		def coordinations
+@Field @Option(name="debug", usage="Show internal variable content", widget="StringArray", metaVar="OFF	ON	ALL	REALLY ALL", required=true, def="OFF")
+		debug
+
+if (!ParametersDialog.open(this)) return
+	if (debug == "OFF") debug = 0; else if (debug == "ON") debug = 1; else if (debug == "ALL") debug = 2 else if (debug == "REALLY ALL") debug = 3
+
+TIGERSearchEngine tse = SearchEnginesManager.getTIGERSearchEngine()
+
+String based_query = """#pivot:[pos="VERB"] & #clause:[cat="root" & type="VFin"] & #clause >L #pivot & #clause >D #obj:[cat=("obj"|"ccomp"|"obj\\:advneg"|"obj\\:advmod")]  & #clause >D #suj:[cat=("nsubj"|"csubj")]  & #obj    >L #objhead:[]  & #suj    >L #sujhead:[]"""
+println "based_query=$based_query"
+def SVO_queries = new LinkedHashMap<String, String>()
+SVO_queries["SVO"] = "& #sujhead .* #pivot   & #pivot   .* #objhead"
+SVO_queries["SOV"] = "& #sujhead .* #objhead & #objhead .* #pivot"
+SVO_queries["OSV"] = "& #objhead .* #sujhead & #sujhead .* #pivot"
+SVO_queries["OVS"] = "& #objhead .* #pivot   & #pivot   .* #sujhead"
+SVO_queries["VSO"] = "& #pivot   .* #sujhead & #sujhead .* #objhead"
+SVO_queries["VOS"] = "& #pivot   .* #objhead & #objhead .* #sujhead"
+
+def test_queries = []
+TableReader reader = new TableReader(query_table_file)
+reader.readHeaders()
+def headers = reader.getHeaders()
+if (!(headers.contains("mesure") && headers.contains("valeur") && headers.contains("requête"))) { // mesure, valeur, requête
+	println "Error: 'mesure', 'valeur', 'requête' columns not found"
+	return
+}
+while (reader.readRecord()) {
+	test_queries << [reader.get("mesure"), reader.get("valeur"), reader.get("requête")]
+}
+
+println "mesure	valeur	SVO	SOV	OSV	OVS	VSO	VOS"
+
+def results = new LinkedHashMap()
+for (def corpus : selection) {
+	
+	def root = corpus.getRootCorpusBuild();
+	File buildDirectory = new File(root.getProjectDirectory(), "tiger");
+	
+	if (!tse.hasIndexes(corpus)) {
+		println "Warning: skipping $corpus: no TIGERSearch indexes found."
+		continue;
+	}
+	
+	def tcorpus = tse.getTSCorpus(corpus);
+	def based_sentences_min_max = tse.getSentMinMax(corpus);
+	
+	for (def test : test_queries) {
+		def test_query = test[2]
+		
+		print test[0]+"\t"+test[1]
+		
+		for (def k : SVO_queries.keySet()) {
+			def svo_query = based_query+"\n"+SVO_queries[k]+"\n"+test_query
+				
+			def test_result = tcorpus.manager.processQuery(svo_query, based_sentences_min_max[0], based_sentences_min_max[1], 9999999);
+			if (count_subgraph) {
+				print "	"+test_result.submatchSize()
+			} else {
+				print "	"+test_result.size()
+			}
+		}
+		println ""
+
+		//			for (def svo_match : svo_result.getMatches()) {
+		//
+		//			}
+	}
+}
+
+println ""
+
+println "Done."
+
+return results
\ No newline at end of file
Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy	(revision 2334)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImporter.groovy	(revision 2335)
@@ -126,9 +126,12 @@
 		if (!doToXMLTXMStep()) return;
 		if (!doInjectMetadataStep()) return;
 
-		module.orderedFiles = new ArrayList<File>();
-		for (def f : xmlFiles) module.orderedFiles.add(new File(outputDirectory, f.getName()))
-		
+		module.orderedFiles = new ArrayList<String>();
+		for (def f : xmlFiles) {
+			String id = f.getName()
+			id = id.substring(0, id.indexOf(".xml"))
+			module.orderedFiles.add(id)
+		}
 		isSuccessFul = outputDirectory.listFiles(IOUtils.HIDDENFILE_FILTER).size() > 0
 		
 		String cleanDirectories = project.getCleanAfterBuild();
Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImport.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImport.groovy	(revision 2334)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImport.groovy	(revision 2335)
@@ -99,7 +99,7 @@
 		}
 	}
 	
-	ArrayList<String> orderedFiles= null;
+	ArrayList<String> orderedFiles = null;
 	protected ArrayList<String> getTXMFilesOrder() {
 		orderedFiles;
 	}
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 2334)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERSearchEngine.java	(revision 2335)
@@ -85,12 +85,31 @@
 	 * @throws CqiClientException
 	 */
 	public static int[] getSentMinMax(CQPCorpus cqpCorpus) throws UnexpectedAnswerException, IOException, CqiServerError, CqiClientException {
+		List<org.txm.searchengine.cqp.corpus.query.Match> matches = cqpCorpus.getMatches();
+		if (matches.size() == 0) {
+			return new int[]{0,0};
+		}
+
+		return getSentMinMax(cqpCorpus, matches.get(0).getStart(), matches.get(matches.size()-1).getEnd());
+	}
+	
+	/**
+	 * 
+	 * @param cqpCorpus the targeted CQPCorpus 
+	 * @return the first sentence and last sentence id (from 0 to N, N the number of sentences). WARNING: this is not the list of sentences in the targeted CQPCorpus. unless the CQPcorpus is contigues
+	 * 
+	 * @throws UnexpectedAnswerException
+	 * @throws IOException
+	 * @throws CqiServerError
+	 * @throws CqiClientException
+	 */
+	public static int[] getSentMinMax(CQPCorpus cqpCorpus, int start, int end) throws UnexpectedAnswerException, IOException, CqiServerError, CqiClientException {
 		AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
 		List<org.txm.searchengine.cqp.corpus.query.Match> matches = cqpCorpus.getMatches();
 		if (matches.size() == 0) {
 			return new int[]{0,0};
 		}
-		int[] cpos = new int[] {matches.get(0).getStart(), matches.get(matches.size()-1).getEnd()};
+		int[] cpos = new int[] {start, end};
 		int[] structs = CQI.cpos2Struc(cqpCorpus.getStructuralUnit("s").getProperty("n").getQualifiedName(), cpos);
 		if (structs.length == 0) {
 			return new int[]{0,0};
