Index: tmp/org.txm.searchengine.cqp.rcp/plugin.xml
===================================================================
--- tmp/org.txm.searchengine.cqp.rcp/plugin.xml	(revision 710)
+++ tmp/org.txm.searchengine.cqp.rcp/plugin.xml	(revision 711)
@@ -138,6 +138,31 @@
          </command>
             </menuContribution>
       <menuContribution
+            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.rcp.corporaview.corpus.manage">
+         <command
+               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreateSubCorpus"
+               icon="icons/functions/subcorpus.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreatePartition"
+               icon="icons/functions/partition.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
             locationURI="menu:menu.file.export">
          <command
                commandId="org.txm.searchengine.cqp.rcp.handlers.base.ExportCorpus"
@@ -154,6 +179,31 @@
          </command>
       </menuContribution>
       <menuContribution
+            locationURI="menu:menu.corpus?after=menu.corpus.build">
+         <command
+               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreateSubCorpus"
+               icon="icons/functions/subcorpus.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+         <command
+               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreatePartition"
+               icon="icons/functions/partition.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <reference
+                     definitionId="OneCorpusSelected">
+               </reference>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
             allPopups="true"
             locationURI="toolbar:org.txm.rcp.toolbarfile">
             <command
@@ -171,7 +221,7 @@
             </command>
       </menuContribution>
       <menuContribution
-            locationURI="toolbar:org.txm.rcp.toolbarcorpus?after=org.txm.synopticedition.rcp.handlers.OpenEdition">
+            locationURI="toolbar:org.txm.rcp.toolbarcorpus?after=org.txm.rcp.toolbarcorpus.corpus">
          <command
                commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreateSubCorpus"
                icon="icons/functions/subcorpus.png"
@@ -196,56 +246,6 @@
                </visibleWhen>
             </command>
       </menuContribution>
-      <menuContribution
-            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.rcp.corporaview.corpus.manage">
-         <command
-               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreateSubCorpus"
-               icon="icons/functions/subcorpus.png"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="OneCorpusSelected">
-               </reference>
-            </visibleWhen>
-         </command>
-         <command
-               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreatePartition"
-               icon="icons/functions/partition.png"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="OneCorpusSelected">
-               </reference>
-            </visibleWhen>
-         </command>
-      </menuContribution>
-      <menuContribution
-            locationURI="menu:menu.corpus?after=menu.corpus.build">
-         <command
-               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreateSubCorpus"
-               icon="icons/functions/subcorpus.png"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="OneCorpusSelected">
-               </reference>
-            </visibleWhen>
-         </command>
-         <command
-               commandId="org.txm.searchengine.cqp.rcp.handlers.base.CreatePartition"
-               icon="icons/functions/partition.png"
-               style="push">
-            <visibleWhen
-                  checkEnabled="false">
-               <reference
-                     definitionId="OneCorpusSelected">
-               </reference>
-            </visibleWhen>
-         </command>
-      </menuContribution>
    </extension>
    <extension
          point="org.eclipse.ui.preferencePages">
Index: tmp/org.txm.synopticeditor.rcp/plugin.xml
===================================================================
--- tmp/org.txm.synopticeditor.rcp/plugin.xml	(revision 710)
+++ tmp/org.txm.synopticeditor.rcp/plugin.xml	(revision 711)
@@ -27,7 +27,7 @@
       </menuContribution>
       <menuContribution
             allPopups="true"
-            locationURI="toolbar:org.txm.rcp.toolbarcorpus">
+            locationURI="toolbar:org.txm.rcp.toolbarcorpus?after=org.txm.rcp.toolbarcorpus.read">
          <command
                commandId="org.txm.synopticedition.rcp.handlers.OpenEdition"
                icon="icons/objects/edition.png"
Index: tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java
===================================================================
--- tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java	(revision 710)
+++ tmp/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEngines.java	(revision 711)
@@ -34,7 +34,7 @@
 			} catch(Exception e) {
 				System.out.println("Error: fail to instanciate "+contributions[i].getName()+": "+e.getLocalizedMessage());
 				e.printStackTrace();
-			} 
+			}
 		}
 
 		return engines.size() > 0;
Index: tmp/org.txm.internalview.rcp/plugin.xml
===================================================================
--- tmp/org.txm.internalview.rcp/plugin.xml	(revision 710)
+++ tmp/org.txm.internalview.rcp/plugin.xml	(revision 711)
@@ -12,7 +12,7 @@
          point="org.eclipse.ui.menus">
       <menuContribution
             allPopups="false"
-            locationURI="toolbar:org.txm.rcp.toolbartools?after=ComputeInformationFromCorpus">
+            locationURI="toolbar:org.txm.rcp.toolbarcorpus?after=org.txm.information.rcp.handlers.ComputeInformation">
          <command
                commandId="org.txm.internalview.rcp.handlers.ComputeInternalView"
                icon="icons/internal_view.png"
@@ -27,7 +27,7 @@
       </menuContribution>
       <menuContribution
             allPopups="false"
-            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.rcp.corporaview.corpus.read">
+            locationURI="popup:org.txm.rcp.views.corpora.CorporaView?after=org.txm.information.rcp.handlers.ComputeInformation">
          <command
                commandId="org.txm.internalview.rcp.handlers.ComputeInternalView"
                icon="icons/internal_view.png"
@@ -41,7 +41,7 @@
          </command>
       </menuContribution>
       <menuContribution
-            locationURI="menu:menu.corpus?after=menu.corpus.read">
+            locationURI="menu:menu.corpus?after=org.txm.information.rcp.handlers.ComputeInformation">
          <command
                commandId="org.txm.internalview.rcp.handlers.ComputeInternalView"
                icon="icons/internal_view.png"
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java	(revision 710)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java	(revision 711)
@@ -37,6 +37,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.rosuda.REngine.REXP;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMParameters;
 import org.txm.core.results.TXMResult;
@@ -55,8 +56,10 @@
 import org.txm.utils.logger.Log;
 
 /**
- * Holds specificities computation result.
+ * Compute specificities indexes using a {@link LexicalTable}
  * 
+ * for alternative and test usages, the Specificities.computeIndex(...) method can be used.
+ * 
  * @author mdecorde
  * @author sloiseau
  * 
@@ -129,6 +132,30 @@
 		this.lexicalTable = lexicalTable;
 	}
 	
+	/**
+	 * Utility method to compute the specificity index of a word in a subcorpus.
+	 * <br>
+	 * Calls the R specificities function with a matrix built with the parameters
+	 * <pre>
+	 * f	F-f
+	 * t-f	T-t-F+f
+	 * </pre>
+	 * 
+	 * @param f word frequency in subcorpus
+	 * @param F word frequency in corpus
+	 * @param t subcorpus size
+	 * @param T corpus size
+	 * @return the specificity index
+	 * @throws Exception
+	 */
+	public static double computeIndex(int f, int F, int t, int T) throws Exception {
+		RWorkspace rw = RWorkspace.getRWorkspaceInstance();
+		rw.voidEval("library(textometry)");
+		REXP rez = rw.eval("specificities(matrix(c("+f+", "+(t-f)+", "+(F-f)+", "+(T-t-F+f)+"), ncol=2))");
+		if (rez != null) return rez.asDoubles()[0];
+		return 0.0d;
+	}
+	
 	@Override
 	protected boolean _compute() throws Exception {
 		
Index: tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java
===================================================================
--- tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 710)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 711)
@@ -29,8 +29,9 @@
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 
 /**
- * ILexicalTable logic + TXMResult management methods
+ * Holds the word frequencies table of a {@link Partition} seen through a word property.
  * 
+ * 
  * @author mdecorde
  *
  */
@@ -39,12 +40,11 @@
 	public static Integer LEXICALTABLE_COUNTER = new Integer(1);
 	public static String SYMBOL_BASE = "LexicalTable_"; //$NON-NLS-1$
 
-	/** the statengine data object */
+	/** stores the R table computed */
 	protected ILexicalTable statsData;
-
-	
-	
-	
+	/** stores the R table already computed. the _compute method won't update the result*/
+	protected ILexicalTable alreadyComputedStatsData;
+		
 	/**
 	 * The property.
 	 */
@@ -69,6 +69,7 @@
 	protected boolean pUseAllOccurrences;
 	
 	/**
+	 * Build a LexicalTable result with an already computed frequency R table
 	 * 
 	 * @param corpus
 	 * @param analysisProperty
@@ -77,26 +78,28 @@
 	public LexicalTable(Corpus corpus, Property analysisProperty, ILexicalTable itable) {
 		super(corpus);
 		this.pProperty = analysisProperty;
-		this.statsData = itable;
+		this.alreadyComputedStatsData = itable;
 	}
 
 	
 	/**
+	 * Build a LexicalTable with the {@link Subcorpus} words and {@link Subcorpus} parent remaining words.
 	 * 
 	 * @param corpus
-	 * @param analysisProperty
+	 * @param analysisProperty the property to count
 	 * @throws Exception
 	 */
-	public LexicalTable(Corpus corpus, Property analysisProperty) throws Exception {
+	public LexicalTable(Subcorpus corpus, Property analysisProperty) throws Exception {
 		this(corpus, analysisProperty, null);
 	}
 	
 	/**
+	 * Build a LexicalTable with the Subcorpus words and Subcorpus parent remaining words.
 	 * 
 	 * @param corpus
 	 * @throws Exception
 	 */
-	public LexicalTable(Corpus corpus) throws Exception {
+	public LexicalTable(Subcorpus corpus) throws Exception {
 		this(corpus, corpus.getDefaultProperty());
 	}
 	
@@ -154,7 +157,7 @@
 	private LexicalTable(TXMResult parent, Property analysisProperty, int fMin, int vMax, boolean useAllOccurrences, ILexicalTable iTable)	{
 		super(parent);
 		this.setParameters(analysisProperty, fMin, vMax, useAllOccurrences);
-		this.statsData = iTable;
+		this.alreadyComputedStatsData = iTable;
 	}
 
 	
@@ -347,7 +350,12 @@
 	@Override
 	protected boolean _compute() throws Exception {
 
-		if (this.parent instanceof Subcorpus) {
+		this.statsData = null; // reset frequencies
+		
+		if (alreadyComputedStatsData != null) {
+			this.statsData = alreadyComputedStatsData;
+		}
+		else if (this.parent instanceof Subcorpus) {
 
 			this.subTask("Computing from Subcorpus.");
 			
@@ -374,6 +382,10 @@
 			this._computeFromIndexes(Arrays.asList((Index)this.parent));
 		}
 		
+		if (this.statsData == null) { // no statsData computed or given
+			return false;
+		}
+		
 		//this.statsData.filter(this.pVMaxFilter, this.pfMinFilter);
 		// FIXME old version
 		this.statsData.cut(this.pVMaxFilter);
Index: tmp/org.txm.rcp/plugin.xml
===================================================================
--- tmp/org.txm.rcp/plugin.xml	(revision 710)
+++ tmp/org.txm.rcp/plugin.xml	(revision 711)
@@ -1300,6 +1300,10 @@
       <menuContribution
             allPopups="true"
             locationURI="toolbar:org.eclipse.ui.main.toolbar">
+         <separator
+               name="org.txm.rcp.toolbars.begin"
+               visible="false">
+         </separator>
          <toolbar
                id="org.txm.rcp.toolbars.result">
             <command
@@ -1356,6 +1360,17 @@
                   </or>
                </visibleWhen>
             </command>
+         </toolbar>
+         <separator
+               name="org.txm.rcp.toolbar.separator1"
+               visible="false">
+         </separator>
+         <toolbar
+               id="org.txm.rcp.toolbarcorpus">
+            <separator
+                  name="org.txm.rcp.toolbarcorpus.read"
+                  visible="false">
+            </separator>
             <command
                   commandId="org.txm.rcp.commands.base.DeleteObject?after=org.txm.information.rcp.handlers.ComputeInformation"
                   icon="icons/functions/Delete.png"
@@ -1391,21 +1406,14 @@
                   </or>
                </visibleWhen>
             </command>
-         </toolbar>
-         <separator
-               name="org.txm.rcp.toolbar.separator1"
-               visible="true">
-         </separator>
-         <toolbar
-               id="org.txm.rcp.toolbarcorpus">
             
             <separator
                   name="org.txm.rcp.toolbarcorpus.corpus"
-                  visible="true">
+                  visible="false">
             </separator>
             <separator
                   name="org.txm.rcp.toolbarcorpus.annotation"
-                  visible="true">
+                  visible="false">
             </separator>
          </toolbar>
          <separator
@@ -1979,10 +1987,6 @@
                   name="org.txm.rcp.corporaview.corpus.read"
                   visible="true">
             </separator>
-            <separator
-                  name="org.txm.rcp.corporaview.corpus.manage"
-                  visible="true">
-            </separator>
             
             <command
                   commandId="org.txm.rcp.commands.base.DeleteObject"
@@ -2019,6 +2023,10 @@
                </visibleWhen>
             </command>
             <separator
+                  name="org.txm.rcp.corporaview.corpus.manage"
+                  visible="true">
+            </separator>
+            <separator
                   name="org.txm.rcp.corporaview.annotation"
                   visible="true">
             </separator>
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 710)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 711)
@@ -201,13 +201,14 @@
 			selections = null;
 		}
 
-		String tmp = Toolbox.getTXMHOMEPATH() + "/scripts"; //$NON-NLS-1$
-		if (previousScriptRootDir == null || !tmp.equals(previousScriptRootDir)) {
-			previousScriptRootDir = tmp;
-			gse = null;
-			//System.out.println("SCRIPT ROOT DIR CHANGED tmp="+tmp);
-		}
+//		 //$NON-NLS-1$
+//		if (previousScriptRootDir == null || !tmp.equals(previousScriptRootDir)) {
+//			previousScriptRootDir = tmp;
+//			gse = null;
+//			//System.out.println("SCRIPT ROOT DIR CHANGED tmp="+tmp);
+//		}
 
+		String scriptsRootDirectories = Toolbox.getTXMHOMEPATH() + "/scripts";
 		String dir = currentRootDir.getAbsolutePath();
 		String path = scriptfile.getAbsolutePath();
 		if (!path.startsWith(dir)) {
@@ -216,13 +217,13 @@
 		}
 		final String relativepath = path.substring(dir.length()+1);
 
-		if (gse == null) {
-			gse = buildGSE(previousScriptRootDir, scriptfile);
+		//if (gse == null) {
+			gse = buildGSE(scriptsRootDirectories, scriptfile);
 			if (gse == null) {
 				System.out.println("Could not create the Groovy script engine. Aborting.");
 				return;
 			}
-		}
+		//}
 
 		JobHandler jobhandler = new JobHandler(NLS.bind(TXMUIMessages.ExecuteRScript_1,scriptfile.getName())) {
 			@Override
@@ -243,6 +244,7 @@
 					
 					System.out.println(NLS.bind(TXMUIMessages.ExecuteRScript_1, scriptfile.getName()));
 					long time = System.currentTimeMillis();
+					System.out.println(relativepath);
 					gse.run(relativepath, binding);
 					
 					System.out.println(TXMUIMessages.ExecuteRScript_2+(System.currentTimeMillis()-time)+TXMUIMessages.ExecuteGroovyScript_0);
