Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSummaryMacro.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSummaryMacro.groovy	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSummaryMacro.groovy	(revision 2346)
@@ -27,8 +27,8 @@
 
 @Field @Option(name="tiger_query", usage="A Full TIGERSearch query", widget="Text", required=true, def="[]")
 		String tiger_query
-@Field @Option(name="count_subgraph", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
-		def count_subgraph
+@Field @Option(name="count_sub_matches", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
+		def count_sub_matches
 @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	
@@ -54,7 +54,7 @@
 	def sentences_min_max = tse.getSentMinMax(corpus);
 	def mresult = tcorpus.manager.processQuery(tiger_query, sentences_min_max[0], sentences_min_max[1], 9999999);
 	int size = 0;
-	if (count_subgraph) {
+	if (count_sub_matches) {
 		size = mresult.submatchSize();
 	} else {
 		size = mresult.size();
Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERRatioMacro.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERRatioMacro.groovy	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERRatioMacro.groovy	(revision 2346)
@@ -29,22 +29,22 @@
 		String tiger_query_A
 		@Field @Option(name="tiger_query_B", usage="A Full TIGERSearch query", widget="Text", required=true, def="[]")
 		String tiger_query_B
-@Field @Option(name="count_subgraph", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
-		def count_subgraph
+@Field @Option(name="count_sub_matches", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
+		def count_sub_matches
 @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
 
 
-def results_A = gse.run(TIGERSummaryMacro, ["args":["tiger_query":tiger_query_A, "count_subgraph":count_subgraph, "debug":debug],
+def results_A = gse.run(TIGERSummaryMacro, ["args":["tiger_query":tiger_query_A, "count_sub_matches":count_sub_matches, "debug":debug],
 	"selection":selection,
 	"selections":selections,
 	"corpusViewSelection":corpusViewSelection,
 	"corpusViewSelections":corpusViewSelections,
 	"monitor":monitor])
 
-def results_B = gse.run(TIGERSummaryMacro, ["args":["tiger_query":tiger_query_B, "count_subgraph":count_subgraph, "debug":debug],
+def results_B = gse.run(TIGERSummaryMacro, ["args":["tiger_query":tiger_query_B, "count_sub_matches":count_sub_matches, "debug":debug],
 	"selection":selection,
 	"selections":selections,
 	"corpusViewSelection":corpusViewSelection,
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 2345)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERSVOSummaryMacro.groovy	(revision 2346)
@@ -6,9 +6,11 @@
 
 import groovy.transform.Field
 
+import org.txm.libs.office.WriteODS
 import org.txm.searchengine.core.SearchEnginesManager
 import org.txm.searchengine.cqp.corpus.*
 import org.txm.searchengine.ts.TIGERSearchEngine
+import org.txm.utils.ConsoleProgressBar
 import org.txm.utils.TableReader
 
 def scriptName = this.class.getSimpleName()
@@ -26,29 +28,53 @@
 	for (def c : selection) c.compute(false)
 }
 
+@Field @Option(name="new_ods_file", usage="file to create", widget="FileSave", required=true, def="result.ods")
+		def new_ods_file
 @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.*")
+@Field @Option(name="count_sub_matches", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
+		def count_sub_matches
+@Field @Option(name="sujet_value", usage="", widget="String", required=true, def="[cat=(\"nsubj\"|\"csubj\")]")
 		def sujet_value
-@Field @Option(name="object_value", usage="", widget="String", required=true, def=".*obj.*")
+@Field @Option(name="object_value", usage="", widget="String", required=true, def="[cat=(\"obj\"|\"ccomp\"|\"obj\\\\:advneg\"|\"obj\\\\:advmod\")]")
 		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="clauses_count_main", usage="", widget="Boolean", required=true, def="true")
+		def clauses_count_main
+@Field @Option(name="clauses_count_subordinate", usage="", widget="Boolean", required=true, def="false")
+		def clauses_count_subordinate
+@Field @Option(name="clauses_count_inserted", usage="", widget="Boolean", required=true, def="false")
+		def clauses_count_inserted
+@Field @Option(name="print_queries", usage="insert columns with the used queries", widget="Boolean", required=true, def="true")
+		def print_queries
 @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()
+if (!clauses_count_main && !clauses_count_subordinate && !clauses_count_inserted) {
+	println "Error: at least one clause must be selected"
+	return
+}
 
-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:[]"""
+String based_query = """#pivot:[pos="VERB"] 
+& #clause:CLAUSEVALUE
+& #clause >L #pivot 
+& #clause >D #obj:OBJVALUE
+& #clause >D #suj:SUJVALUE
+& #obj    >L #objhead:[]  & #suj    >L #sujhead:[]"""
+
+String clause_value = "[cat=\"root\" & type=\"VFin\"]" // main clause
+if (clauses_count_inserted) {
+	clause_value = "[cat=\"Insrt\" & type=\"VFin\"]"
+} else if (clauses_count_subordinate) {
+	clause_value = "[cat!=(\"root\"|\"Insrt\") & type=\"VFin\"]"
+}
+based_query = based_query.replaceAll("CLAUSEVALUE", clause_value)
+based_query = based_query.replaceAll("OBJVALUE", object_value)
+based_query = based_query.replaceAll("SUJVALUE", sujet_value)
+
 println "based_query=$based_query"
 def SVO_queries = new LinkedHashMap<String, String>()
 SVO_queries["SVO"] = "& #sujhead .* #pivot   & #pivot   .* #objhead"
@@ -57,24 +83,37 @@
 SVO_queries["OVS"] = "& #objhead .* #pivot   & #pivot   .* #sujhead"
 SVO_queries["VSO"] = "& #pivot   .* #sujhead & #sujhead .* #objhead"
 SVO_queries["VOS"] = "& #pivot   .* #objhead & #objhead .* #sujhead"
-
+int ncols = 2 + (SVO_queries.keySet().size() * (print_queries?2:1))
+	
 def test_queries = []
 TableReader reader = new TableReader(query_table_file)
 reader.readHeaders()
+
+WriteODS writer = new WriteODS(new_ods_file);
+
 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")]
+	test_queries << [
+		reader.get("mesure"),
+		reader.get("valeur"),
+		reader.get("requête")
+	]
 }
 
-println "mesure	valeur	SVO	SOV	OSV	OVS	VSO	VOS"
+ConsoleProgressBar cpb = new ConsoleProgressBar(selection.size())
 
+
+TIGERSearchEngine tse = SearchEnginesManager.getTIGERSearchEngine()
 def results = new LinkedHashMap()
 for (def corpus : selection) {
+	cpb.tick()
 	
+	writer.newTable(corpus.getName())
+	
 	def root = corpus.getRootCorpusBuild();
 	File buildDirectory = new File(root.getProjectDirectory(), "tiger");
 	
@@ -83,34 +122,42 @@
 		continue;
 	}
 	
+	writer.declareRowsAndColumns(0, ncols)
+	def cols = ["mesure", "valeur"] 
+	for (String col : SVO_queries.keySet()) {
+		if (print_queries) cols << "q"+col
+		cols << col
+	}
+	writer.writeLine(cols)
+		
 	def tcorpus = tse.getTSCorpus(corpus);
 	def based_sentences_min_max = tse.getSentMinMax(corpus);
 	
 	for (def test : test_queries) {
 		def test_query = test[2]
+		def lineToWrite = []
+		lineToWrite << test[0]
+		lineToWrite << test[1]
 		
-		print test[0]+"\t"+test[1]
-		
 		for (def k : SVO_queries.keySet()) {
 			def svo_query = based_query+"\n"+SVO_queries[k]+"\n"+test_query
-				
+			
+			if (debug > 0) println svo_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()
+			if (print_queries) lineToWrite << svo_query
+			if (count_sub_matches) {
+				lineToWrite << test_result.submatchSize()
 			} else {
-				print "	"+test_result.size()
+				lineToWrite << test_result.size()
 			}
 		}
-		println ""
-
-		//			for (def svo_match : svo_result.getMatches()) {
-		//
-		//			}
+		
+		writer.writeLine(lineToWrite)
 	}
 }
 
-println ""
+writer.save()
+cpb.done()
 
-println "Done."
-
 return results
\ No newline at end of file
Index: tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERIndexMacro.groovy
===================================================================
--- tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERIndexMacro.groovy	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/groovy/org/txm/macro/tiger/exploit/TIGERIndexMacro.groovy	(revision 2346)
@@ -43,8 +43,8 @@
 		def labels
 @Field @Option(name="properties", usage="List of properties separated with ','", widget="String", required=true, def="word, word, word")
 		def properties
-@Field @Option(name="count_subgraph", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
-		def count_subgraph
+@Field @Option(name="count_sub_matches", usage="A Full TIGERSearch query", widget="Boolean", required=true, def="true")
+		def count_sub_matches
 @Field @Option(name="sort_column", usage="choose between the len or freq columns", widget="StringArray", metaVar="freq	labels", required=false, def="freq")
 		String sort_column
 		@Field @Option(name="max_lines", usage="choose between the len or freq columns", widget="Integer", metaVar="freq	labels", required=false, def="-1")
@@ -149,7 +149,7 @@
 			counts[strings] = counts[strings] + 1
 			total_counts[strings] = total_counts[strings] + 1
 
-			if (!count_subgraph) break;
+			if (!count_sub_matches) break;
 		}
 	}
 
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSResult.java	(revision 2346)
@@ -50,7 +50,6 @@
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.importer.ApplyXsl2;
 
-// TODO: Auto-generated Javadoc
 /**
  * The Class TSResult.
  */
@@ -71,9 +70,9 @@
 	/** The matches. */
 	TSMatch[] matches;
 
-	/** The current match. */
-	int currentMatchNo = 0;
-	TSMatch currentMatch;
+//	/** The current match. */
+//	int currentMatchNo = 0;
+//	TSMatch currentMatch;
 
 	/** The query. */
 	private String query;
@@ -139,38 +138,38 @@
 		return result.size();
 	}
 
-	/**
-	 * return the no of match, begins with 1.
-	 *
-	 * @return the current match no
-	 */
-	public int getCurrentMatchNo() {
-		return currentMatchNo;
-	}
+//	/**
+//	 * return the no of match, begins with 1.
+//	 *
+//	 * @return the current match no
+//	 */
+//	public int getCurrentMatchNo() {
+//		return currentMatchNo;
+//	}
+//
+//	/**
+//	 * return the no of match, begins with 1.
+//	 *
+//	 * @return the current match no
+//	 */
+//	public TSMatch getCurrentMatch() {
+//		return currentMatch;
+//	}
 
-	/**
-	 * return the no of match, begins with 1.
-	 *
-	 * @return the current match no
-	 */
-	public TSMatch getCurrentMatch() {
-		return currentMatch;
-	}
+//	/**
+//	 * return the no of match, begins with 1.
+//	 *
+//	 * @return the current sentence no
+//	 */
+//	public int getCurrentSentenceNo() {
+//		System.out.println(TXMCoreMessages.numberOfMatch+this.getNumberOfMatch());
+//		System.out.println("current match "+this.getCurrentMatchNo()); //$NON-NLS-1$
+//		System.out.println(TXMCoreMessages.numberOfSubMatch+this.getCurrentMatch().getNumberOfSubGraph());
+//		System.out.println("current sub graph "+this.getCurrentMatch().getCurrentSubMatchNo()); //$NON-NLS-1$
+//		return result.getSentenceNumberAt(this.currentMatchNo); // + 1 ?
+//	}
 
 	/**
-	 * return the no of match, begins with 1.
-	 *
-	 * @return the current sentence no
-	 */
-	public int getCurrentSentenceNo() {
-		System.out.println(TXMCoreMessages.numberOfMatch+this.getNumberOfMatch());
-		System.out.println("current match "+this.getCurrentMatchNo()); //$NON-NLS-1$
-		System.out.println(TXMCoreMessages.numberOfSubMatch+this.getCurrentMatch().getNumberOfSubGraph());
-		System.out.println("current sub graph "+this.getCurrentMatch().getCurrentSubMatchNo()); //$NON-NLS-1$
-		return result.getSentenceNumberAt(this.currentMatchNo); // + 1 ?
-	}
-
-	/**
 	 * Gets the match.
 	 *
 	 * @param matchNo the no
@@ -198,9 +197,9 @@
 	public TSMatch getFirst()
 	{
 		if (result.size() > 0) {
-			currentMatchNo = 0;
-			currentMatch = getMatch(0);
-			return currentMatch;
+//			currentMatchNo = 0;
+//			currentMatch = getMatch(0);
+			return getMatch(0);
 		} else {
 			return null;
 		}
@@ -214,54 +213,54 @@
 	public TSMatch getLast()
 	{
 		if (result.size() > 0) {
-			currentMatchNo = result.size() -1;
-			currentMatch = getMatch(result.size() -1);
-			return currentMatch;
+//			currentMatchNo = result.size() -1;
+//			currentMatch = getMatch(result.size() -1);
+			return getMatch(result.size() -1);
 		} else {
 			return null;
 		}
 	}
+//
+//	/**
+//	 * Gets the next.
+//	 *
+//	 * @return the next
+//	 */
+//	public TSMatch getNext()
+//	{
+//		int next = currentMatchNo + 1;
+//		if (result.size() > next) {
+//			currentMatchNo = next;
+//			currentMatch = getMatch(next);
+//			return currentMatch;
+//		} else {
+//			return null;
+//		}
+//	}
+//
+//	/**
+//	 * Gets the previous.
+//	 *
+//	 * @return the previous
+//	 */
+//	public TSMatch getPrevious()
+//	{
+//		int next = currentMatchNo - 1;
+//		if (next >= 0 && result.size() > 0) {
+//			currentMatchNo = next;
+//			currentMatch = getMatch(next);
+//			return currentMatch;
+//		} else {
+//			return null;
+//		}
+//	}
+//
+//	public TSMatch setCurrentMatch(int graphNo) {
+//		currentMatch = this.getMatch(graphNo);
+//		currentMatchNo = graphNo;
+//		return currentMatch;
+//	}
 
-	/**
-	 * Gets the next.
-	 *
-	 * @return the next
-	 */
-	public TSMatch getNext()
-	{
-		int next = currentMatchNo + 1;
-		if (result.size() > next) {
-			currentMatchNo = next;
-			currentMatch = getMatch(next);
-			return currentMatch;
-		} else {
-			return null;
-		}
-	}
-
-	/**
-	 * Gets the previous.
-	 *
-	 * @return the previous
-	 */
-	public TSMatch getPrevious()
-	{
-		int next = currentMatchNo - 1;
-		if (next >= 0 && result.size() > 0) {
-			currentMatchNo = next;
-			currentMatch = getMatch(next);
-			return currentMatch;
-		} else {
-			return null;
-		}
-	}
-
-	public TSMatch setCurrentMatch(int graphNo) {
-		currentMatch = this.getMatch(graphNo);
-		currentMatchNo = graphNo;
-		return currentMatch;
-	}
-
 	public boolean toXml(File outfile, File xmlFile, File xslFile) throws ExportException, ExportStopException, IOException, TransformerException
 	{
 		return toXml(outfile, xmlFile, xslFile, false, 30, new ArrayList<String>(), new ArrayList<String>());
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TIGERSearchEditor.java	(revision 2346)
@@ -99,6 +99,11 @@
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
+				if (e.widget == sentSpinner) {
+					subSpinner.setSelection(1);
+					subSpinner.setMaximum(ts.getNSubGraph(sentSpinner.getSelection()-1));
+					subCounterLabel.setText("/"+ts.getNSubGraph(sentSpinner.getSelection()-1));
+				}
 				reloadGraph();
 			}
 
@@ -137,24 +142,14 @@
 		NTCombo.setLayoutData(gdata);
 		NTCombo.addSelectionListener(selChangedListener);
 
-		okButton = new Button(queryPanel, SWT.PUSH);
-		okButton.setText("Search");
-		okButton.addSelectionListener(new SelectionListener() {
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				compute(true);
-			}
-
-			@Override
-			public void widgetDefaultSelected(SelectionEvent e) { }
-		});
 		queryArea.addListener(SWT.KeyDown, new Listener() {
 			public void handleEvent(Event e) {
-				if (e.stateMask == SWT.CTRL)
+				if (e.stateMask == SWT.CTRL) {
 					if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
 						e.doit = false;
 						compute(true);
 					}
+				}
 			}
 		});
 
@@ -163,6 +158,7 @@
 		svgPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
 
 		initializeFields();
+		this.getTopToolbar().setVisible(COMPUTING_PARAMETERS_GROUP_ID, true);
 	}
 
 	protected void initializeFields() {
@@ -216,17 +212,17 @@
 				if (ts.isComputed()) {
 					queryArea.setText(ts.getQuery());
 					sentCounterLabel.setText("/"+ts.getNSentences());
-					subCounterLabel.setText("/"+ts.getNSubGraph());
+					subCounterLabel.setText("/"+ts.getNSubGraph(0));
 				} else {
 					sentCounterLabel.setText("No Sentence");
 					subCounterLabel.setText("No sub graph");
 				}
 
 				if (ts.isDrawn()) {
-					sentSpinner.setSelection(ts.getSent());
+					sentSpinner.setSelection(1);
 					sentSpinner.setMaximum(ts.getNSentences());
-					subSpinner.setSelection(ts.getSub());
-					subSpinner.setMaximum(ts.getNSubGraph());
+					subSpinner.setSelection(ts.getSub(0));
+					subSpinner.setMaximum(ts.getNSubGraph(0));
 
 					reloadGraph();
 				} else {
@@ -234,7 +230,7 @@
 					subSpinner.setSelection(1);
 					if (ts.isComputed()) {
 						sentSpinner.setMaximum(ts.getNSentences());
-						subSpinner.setMaximum(ts.getNSubGraph());
+						subSpinner.setMaximum(ts.getNSubGraph(0));
 					} else {
 						sentSpinner.setMaximum(1);
 						subSpinner.setMaximum(1);
@@ -268,7 +264,8 @@
 	@Override
 	public void updateResultFromEditor() {
 		
-		reloadGraph();
+		String query = this.queryArea.getText();
+		this.queryArea.setText(query.trim());
 	}
 
 	@Override
@@ -298,11 +295,11 @@
 			//						public void run() {
 
 			sentCounterLabel.setText("/"+ts.getNSentences());
-			subCounterLabel.setText("/"+ts.getNSubGraph());
+			subCounterLabel.setText("/"+ts.getNSubGraph(0));
 			sentSpinner.setSelection(1);
 			sentSpinner.setMaximum(ts.getNSentences());
 			subSpinner.setSelection(1);
-			subSpinner.setMaximum(ts.getNSubGraph());
+			subSpinner.setMaximum(ts.getNSubGraph(0));
 
 			reloadGraph();
 
Index: tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java
===================================================================
--- tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 2345)
+++ tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERSearch.java	(revision 2346)
@@ -141,21 +141,23 @@
 		return tsresult.getNumberOfMatch();
 	}
 
-	public int getNSubGraph() {
+	public int getNSubGraph(int matchNo) {
 		if (tsresult == null) return 0;
-		if (tsresult.getCurrentMatch() == null) return 0;
+		if (tsresult.getMatch(matchNo) == null) return 0;
 		
-		return tsresult.getCurrentMatch().getNumberOfSubGraph();
+		return tsresult.getMatch(matchNo).getNumberOfSubGraph();
 	}
 
-	public int getSent() {
-		if (tsresult == null) return 0;
-		return tsresult.getCurrentMatchNo();
-	}
+//	public int getSent() {
+//		if (tsresult == null) return 0;
+//		return tsresult.getCurrentMatchNo();
+//	}
 
-	public int getSub() {
+	public int getSub(int matchNo) {
 		if (tsresult == null) return 0;
-		return tsresult.getCurrentMatch().getCurrentSubMatchNo();
+		if (tsresult.getMatch(matchNo) == null) return 0;
+		
+		return tsresult.getMatch(matchNo).getCurrentSubMatchNo();
 	}
 
 	public String getQuery() {
@@ -210,7 +212,7 @@
 
 	@Override
 	public boolean canCompute() {
-		return corpus != null && pQuery != null && pQuery.length() > 0;
+		return corpus != null; // && pQuery != null && pQuery.length() > 0; // if pQuery is empty/null set a default query 
 	}
 
 	@Override
@@ -235,9 +237,11 @@
 	protected boolean _compute() throws Exception {
 
 		if (tscorpus == null) return false;
+		
 		tsresult = null;
-		if (pQuery.length() == 0) {
-			return false;
+		
+		if (pQuery == null || pQuery.length() == 0) {
+			pQuery = "root(#n1)";
 		}
 		tsresult = tscorpus.query(pQuery);
 		tsresult.getFirst();
@@ -248,5 +252,4 @@
 	public String getResultType() {
 		return "Tiger search";
 	}
-
 }
