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 1425)
+++ tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java	(revision 1426)
@@ -8,6 +8,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.osgi.util.NLS;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMParameters;
@@ -32,6 +33,8 @@
 /**
  * Holds the word frequencies table of a {@link Partition} seen through a word property.
  * 
+ * until the LT is computed the internal R table is set to an empty matrix with rownames and colnames set
+ * 
  * @author mdecorde
  * @author sjacquot
  * 
@@ -68,30 +71,6 @@
 	@Parameter(key=LexicalTablePreferences.USE_ALL_OCCURRENCES)
 	protected boolean useAllOccurrences;
 
-//	/**
-//	 * Build a LexicalTable result with an already computed frequency R table
-//	 * 
-//	 * @param corpus
-//	 * @param analysisProperty
-//	 * @param itable
-//	 */
-//	public LexicalTable(CQPCorpus corpus, WordProperty analysisProperty, ILexicalTable itable) {
-//		super(corpus);
-//		this.property = analysisProperty;
-//		this.statsData = itable;
-//	}
-
-//	/**
-//	 * Build a LexicalTable with the {@link Subcorpus} words and {@link Subcorpus} parent remaining words.
-//	 * 
-//	 * @param corpus
-//	 * @param analysisProperty the property to count
-//	 * @throws Exception
-//	 */
-//	public LexicalTable(Subcorpus corpus, WordProperty analysisProperty) {
-//		this(corpus, analysisProperty, null);
-//	}
-
 	/**
 	 * Build a LexicalTable with the Subcorpus words and Subcorpus parent remaining words.
 	 * 
@@ -104,20 +83,17 @@
 //		if (property == null) {
 //			this.setUnitProperty(corpus.getDefaultProperty());
 //		}
+		
+		try { // create empty LT to store infos
+			String[] rowNames = {};
+			String[] colNames = {NLS.bind("{0}-{1}", corpus.getCorpusParent().getName(), corpus.getName()), corpus.getName()};
+			int[][] matrix = new int[0][2];
+			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 
-//	/**
-//	 * 
-//	 * @param partition
-//	 * @param analysisProperty
-//	 * @param fMin
-//	 * @param vMax
-//	 * @param iTable
-//	 */
-//	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax, ILexicalTable iTable) {
-//		this(partition, analysisProperty, fMin, vMax, false, iTable);
-//	}
-
 	/**
 	 * 
 	 * @param index
@@ -127,6 +103,16 @@
 		
 		this.property = index.getProperties().get(0);
 		this.useAllOccurrences = true;
+		
+		try { // create empty LT to store infos
+			String[] rowNames = {};
+			List<String> names = index.getPartition().getPartNames();
+			String[] colNames = names.toArray(new String[names.size()]);
+			int[][] matrix = new int[0][names.size()];
+			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 
 	/**
@@ -135,41 +121,18 @@
 	 */
 	public LexicalTable(Partition partition)	{
 		super(partition);
-//		if (property == null) {
-//			try {
-//				this.setUnitProperty(partition.getCorpus().getDefaultProperty());
-//			} catch (CqiClientException e) {
-//				e.printStackTrace();
-//			}
-//		}
+
+		try { // create empty LT to store infos
+			String[] rowNames = {};
+			List<String> names = partition.getPartNames();
+			String[] colNames = names.toArray(new String[names.size()]);
+			int[][] matrix = new int[0][names.size()];
+			this.statsData = new LexicalTableImpl(matrix, rowNames, colNames);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 
-//	/**
-//	 * 
-//	 * @param partition
-//	 * @param analysisProperty
-//	 * @param fMin
-//	 * @param vMax
-//	 */
-//	public LexicalTable(Partition partition, WordProperty analysisProperty, int fMin, int vMax) {
-//		this(partition, analysisProperty, fMin, vMax, null);
-//	}
-
-//	/**
-//	 * 
-//	 * @param parent
-//	 * @param analysisProperty
-//	 * @param fMin
-//	 * @param vMax
-//	 * @param useAllOccurrences
-//	 * @param iTable
-//	 */
-//	private LexicalTable(TXMResult parent, WordProperty analysisProperty, int fMin, int vMax, boolean useAllOccurrences, ILexicalTable iTable)	{
-//		super(parent);
-//		this.setParameters(analysisProperty, fMin, vMax, useAllOccurrences);
-//		this.statsData = iTable;
-//	}
-
 	public LexicalTable(String parametersNodePath)	{
 		super(parametersNodePath);
 	}
@@ -194,7 +157,6 @@
 	}
 
 
-
 	/**
 	 * 
 	 * @param partition
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/MatrixImpl.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/MatrixImpl.java	(revision 1425)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/MatrixImpl.java	(revision 1426)
@@ -109,6 +109,21 @@
 		//this.rows = null;
 		//this.cols = null;
 	}
+	
+	/**
+	 * Instantiates a new matrix impl.
+	 *
+	 * @param matrix the matrix
+	 * @throws RWorkspaceException the r workspace exception
+	 */
+	public MatrixImpl(double[][] matrix, int ncol, int nrow) throws RWorkspaceException {
+		super();
+		rw.addMatrixToWorkspace(symbol, matrix, ncol, nrow);
+		//		this.nrow = matrix.length;
+		//		this.ncol = matrix[0].length;
+		//this.rows = null;
+		//this.cols = null;
+	}
 
 	/**
 	 * Instantiates a new matrix impl.
@@ -165,6 +180,24 @@
 	 * @param matrix the matrix
 	 * @throws RWorkspaceException the r workspace exception
 	 */
+	public MatrixImpl(int[][] matrix, int ncol, int nrow) throws RWorkspaceException {
+		super();
+		rw.addMatrixToWorkspace(symbol, matrix, ncol, nrow);
+		//		this.nrow = matrix.length;
+		//		if (matrix.length > 0)
+		//			this.ncol = matrix[0].length;
+		//		else
+		//			this.ncol = 0;
+		//this.rows = null;
+		//this.cols = null;
+	}
+	
+	/**
+	 * Instantiates a new matrix impl.
+	 *
+	 * @param matrix the matrix
+	 * @throws RWorkspaceException the r workspace exception
+	 */
 	public MatrixImpl(int[][] matrix) throws RWorkspaceException {
 		super();
 		rw.addMatrixToWorkspace(symbol, matrix);
@@ -201,20 +234,23 @@
 	 * @throws RWorkspaceException the r workspace exception
 	 */
 	public MatrixImpl(int[][] matrix, String[] lineNames, String[] partNames) throws RWorkspaceException {
-		this(matrix);
+		this(matrix, partNames!=null?partNames.length:0, lineNames!=null?lineNames.length:0);
 
 		if (lineNames == null) {
 			throw new IllegalArgumentException(StatsEngineCoreMessages.rowNamesOfAContingencyTableCannotBeNull);
 		}
+		
+		if (partNames == null) {
+			throw new IllegalArgumentException(StatsEngineCoreMessages.columnNamesOfAContingencyTableCannotBeNull);
+		}
+		
 		//		if (lineNames.length != nrow) {
 		//			throw new IllegalArgumentException(Messages.MatrixImpl_5);
 		//		}
 		//this.rows = ;
 		rw.assignRowNamesToMatrix(symbol, new VectorImpl(lineNames).getSymbol());
 
-		if (partNames == null) {
-			throw new IllegalArgumentException(StatsEngineCoreMessages.columnNamesOfAContingencyTableCannotBeNull);
-		}
+		
 		//		if (partNames.length != ncol) {
 		//			throw new IllegalArgumentException(Messages.MatrixImpl_7
 		//					+ partNames.length + ", " + ncol + ")."); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/DoubleMatrix.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/DoubleMatrix.java	(revision 1425)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/data/DoubleMatrix.java	(revision 1426)
@@ -59,6 +59,16 @@
 	public DoubleMatrix(double[][] mat) throws RWorkspaceException {
 		super(mat);
 	}
+	
+	/**
+	 * Instantiates a new double matrix.
+	 *
+	 * @param mat the mat
+	 * @throws RWorkspaceException the r workspace exception
+	 */
+	public DoubleMatrix(double[][] mat, int ncol, int nrow) throws RWorkspaceException {
+		super(mat, ncol, nrow);
+	}
 
 	/**
 	 * Instantiates a new double matrix.
Index: tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java
===================================================================
--- tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java	(revision 1425)
+++ tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java	(revision 1426)
@@ -553,14 +553,30 @@
 	 * of column in every row.
 	 * @throws RWorkspaceException the r workspace exception
 	 */
-	public void addMatrixToWorkspace(String variableName, double[][] matrix)
-			throws RWorkspaceException {
+	public void addMatrixToWorkspace(String variableName, double[][] matrix) throws RWorkspaceException {
 		//System.out.println("matrix len: "+matrix.length+" test="+(matrix.length == 0));
 		if (matrix.length == 0) {
 			new RWorkspaceException(RCoreMessages.error_matrixIsEmpty);
 		}
 		int ncol = matrix[0].length;
 		int nrow = matrix.length;
+		
+		addMatrixToWorkspace(variableName, matrix, ncol, nrow);
+	}
+	
+	/**
+	 * Add a matrix into the workspace and link it to a name. The inner arrays
+	 * of the <code>matrix</code> parameters are the <strong>row</strong> of the
+	 * resulting R matrix.
+	 *
+	 * @param variableName the name to be used in the R workspace.
+	 * @param matrix the data to be bound to the name. In the form
+	 * <code>matrix[row][column]</code>, with exactly the same number
+	 * of column in every row.
+	 * @throws RWorkspaceException the r workspace exception
+	 */
+	public void addMatrixToWorkspace(String variableName, double[][] matrix, int ncol, int nrow)
+			throws RWorkspaceException {
 
 		double[] vector = VectorizeArray.vectorizeByInner(matrix);
 
@@ -594,7 +610,7 @@
 			throws RWorkspaceException {
 
 		double[][] data = RColt.doubleMatrix2D2DoubleDoubleArray(matrix);
-		addMatrixToWorkspace(variableName, data);
+		addMatrixToWorkspace(variableName, data, matrix.columns(), matrix.rows());
 
 		// // IntArrayList x = new IntArrayList();
 		// // IntArrayList y = new IntArrayList();
@@ -715,13 +731,27 @@
 	 */
 	public void addMatrixToWorkspace(String variableName, int[][] matrix) throws RWorkspaceException {
 		int ncol = 0;
-		if (matrix.length == 0) {
-			ncol = 0;
-		}
-		else {
+		int nrow = 0;
+		if (matrix.length > 0) {
+			nrow = matrix.length;
 			ncol = matrix[0].length;
 		}
-		int nrow = matrix.length;
+		
+		addMatrixToWorkspace(variableName, matrix, ncol, nrow);
+	}
+	/**
+	 * Add a matrix into the workspace and link it to a name. The inner arrays
+	 * of the <code>matrix</code> parameters are the <strong>row</strong> of the
+	 * resulting R matrix.
+	 *
+	 * @param variableName the name to be used in the R workspace.
+	 * @param matrix the data to be bound to the name. In the form
+	 * <code>matrix[row][column]</code>, with exactly the same number
+	 * of column in every row.
+	 * @throws RWorkspaceException the r workspace exception
+	 */
+	public void addMatrixToWorkspace(String variableName, int[][] matrix, int ncol, int nrow) throws RWorkspaceException {
+		
 		int[] vector = VectorizeArray.vectorizeByInner(matrix);
 		if (!filecommunication) {
 			try {
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 1425)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Partition.java	(revision 1426)
@@ -395,12 +395,16 @@
 	 * @return the part names
 	 */
 	public List<String> getPartNames() {
+		if (hasBeenComputedOnce()) {
 		List<Part> parts = getParts();
 		List<String> partNames = new ArrayList<String>(parts.size());
 		for (Subcorpus part : getParts()) {
 			partNames.add(part.getName());
 		}
 		return partNames;
+		} else {
+			return this.pPartNames;
+		}
 	}
 
 	/**
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1425)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1426)
@@ -124,7 +124,7 @@
 	@Override
 	public String getName() {
 		try {
-			return IndexCoreMessages.lexicon + ": " + this.getSimpleName();
+			return this.getParent().getSimpleName() + ": " + this.getSimpleName();
 		}
 		catch(Exception e) {
 			return this.getEmptyName();
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 1425)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 1426)
@@ -60,7 +60,6 @@
 			return null;
 		}
 
-		
 		try {
 			Object selection = this.getCorporaViewSelectedObject(event);
 			Specificities specificities = null;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 1425)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 1426)
@@ -299,10 +299,10 @@
 				//final int[] sortedPartIndexes = specificitesResult.getSortedPartIndexes();
 	
 				// Create an array of lines to fill the tables
-				Log.finest("len types: " + typeNames.length);
-				Log.finest("len freq: " + typeFreq.length);
-				Log.finest("len specfreqs: " + specFreqs.length);
-				Log.finest("len specidx: " + specIndex.length);
+//				Log.finest("len types: " + typeNames.length);
+//				Log.finest("len freq: " + typeFreq.length);
+//				Log.finest("len specfreqs: " + specFreqs.length);
+//				Log.finest("len specidx: " + specIndex.length);
 				
 				Object[] tableLines = new Object[typeNames.length];
 				for (int j = 0; j < tableLines.length; j++) {
@@ -314,7 +314,6 @@
 				viewer.setInput(null);
 			}
 
-			
 			// Updating the main frequency table header
 			String text = TXMCoreMessages.common_frequency;
 			if(this.getResult().hasBeenComputedOnce())	{
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 1425)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificities.java	(revision 1426)
@@ -37,6 +37,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.eclipse.osgi.util.NLS;
 import org.rosuda.REngine.REXP;
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.results.Parameter;
@@ -102,33 +103,17 @@
 	/** The writer. */
 	@Deprecated
 	private BufferedWriter writer;
-	
 
-	// FIXME: SJ: any way to simplify that? table, lexicon, subLexicon, corpus, subcorpus... 
-	/** The table. */
+	/** The table. contains **all** the corpus data necessary to compute the Specificities */
 	private LexicalTable lexicalTable;
 
-	/** The lexicon. */
-	private CQPLexicon lexicon;
-
-	/** The sub lexicon. */
-	private CQPLexicon subLexicon;
-
-	/** The corpus. */
-	private CQPCorpus corpus;
-
-	/** The sub corpus. */
-	private CQPCorpus subCorpus;
-
-
 	/**
 	 * Maximum score.
 	 */
 	@Parameter(key=SpecificitiesPreferences.MAX_SCORE)
 	protected int maxScore;
-	
-	
-	
+
+
 	/**
 	 * Creates a not computed Specificities.
 	 * @param parent
@@ -137,8 +122,6 @@
 		super(parent);
 	}
 
-
-	
 	/**
 	 * Creates a not computed Specificities.
 	 * @param parametersNodePath
@@ -146,7 +129,7 @@
 	public Specificities(String parametersNodePath)	{
 		this(parametersNodePath, null);
 	}
-	
+
 	/**
 	 * Creates a not computed Specificities.
 	 *
@@ -158,19 +141,17 @@
 	public Specificities(String parametersNodePath, LexicalTable parent) {
 		super(parametersNodePath, parent);
 	}
-	
-	
-	
+
 	@Override
 	public boolean loadParameters() {
 		this.lexicalTable = (LexicalTable) this.parent;
-		
-		CQPCorpus corpus = CQPCorpus.getFirstParentCorpus(this);
-		this.corpus = corpus;
-		if(corpus instanceof Subcorpus)	{
-			this.subCorpus = corpus;
-		}
-		
+
+		//		CQPCorpus corpus = CQPCorpus.getFirstParentCorpus(this);
+		//		this.corpus = corpus;
+		//		if(corpus instanceof Subcorpus)	{
+		//			this.subCorpus = corpus;
+		//		}
+
 		return true;
 	}
 
@@ -179,10 +160,9 @@
 		// nothing to do
 		return true;
 	}
-	
 
-	
 
+
 	@Override
 	protected boolean _compute() throws Exception {
 
@@ -193,25 +173,25 @@
 		if (this.lexicalTable.hasParameterChanged(TBXPreferences.UNIT_PROPERTY))	{
 			this.deleteChildren(SpecificitiesSelection.class);
 		}
-		
+
 		//if (this.lexicalTable.hasBeenComputedOnce())	{ // LT should have been computed one because of TXMResult.compute
-		
+
 		ILexicalTable data = this.lexicalTable.getData();
-		
-			SpecificitiesR rSpecificities = new SpecificitiesR(data);
-			double[][] specIndex = rSpecificities.getScores();
 
-			if (this.lexicalTable.getPartition() != null) {
-				init(symbol, specIndex); 
-			}
-			else {
-				init(rSpecificities.getSymbol(), specIndex); //$NON-NLS-1$
-			}
+		SpecificitiesR rSpecificities = new SpecificitiesR(data);
+		double[][] specIndex = rSpecificities.getScores();
+
+		if (this.lexicalTable.getPartition() != null) {
+			init(symbol, specIndex); 
+		}
+		else {
+			init(rSpecificities.getSymbol(), specIndex); //$NON-NLS-1$
+		}
 		//}
-		
+
 		return true;
 	}
-	
+
 	/**
 	 * Instantiates a new specificities result.
 	 *
@@ -229,7 +209,7 @@
 	 * @throws StatException the stat exception
 	 */
 	protected void init(String symbol, double[][] specIndex) throws Exception {
-		
+
 		this.symbol = symbol;
 
 		if (this.lexicalTable == null) {
@@ -282,25 +262,25 @@
 				}
 			}
 		}
-//		if (this.colnames != null && this.colnames.size() != 0) {
-//			if (this.colnames.size() != specIndex[0].length) {
-//				throw new IllegalArgumentException(
-//						SpecificitiesCoreMessages.SpecificitesResult_7 + this.colnames.size()
-//						+ ", " + specIndex[0].length + ")."); //$NON-NLS-1$//$NON-NLS-2$ 
-//			}
-//			colindex = ArrayIndex.getIndex(
-//					table.getColNames().asStringsArray(), partFocus
-//					.toArray(new String[] {}));
-//			for (int i : colindex) {
-//				if (i == -1) {
-//					throw new IllegalArgumentException(
-//							SpecificitiesCoreMessages.SpecificitesResult_10);
-//				}
-//			}
-//		}
+		//		if (this.colnames != null && this.colnames.size() != 0) {
+		//			if (this.colnames.size() != specIndex[0].length) {
+		//				throw new IllegalArgumentException(
+		//						SpecificitiesCoreMessages.SpecificitesResult_7 + this.colnames.size()
+		//						+ ", " + specIndex[0].length + ")."); //$NON-NLS-1$//$NON-NLS-2$ 
+		//			}
+		//			colindex = ArrayIndex.getIndex(
+		//					table.getColNames().asStringsArray(), partFocus
+		//					.toArray(new String[] {}));
+		//			for (int i : colindex) {
+		//				if (i == -1) {
+		//					throw new IllegalArgumentException(
+		//							SpecificitiesCoreMessages.SpecificitesResult_10);
+		//				}
+		//			}
+		//		}
 	}
 
-	
+
 	/**
 	 * Utility method to compute the specificity index of a word in a subcorpus.
 	 * <br>
@@ -324,8 +304,8 @@
 		if (rez != null) return rez.asDoubles()[0];
 		return 0.0d;
 	}
-	
-	
+
+
 	/**
 	 * Sets the unit property.
 	 * @param unitProperty
@@ -333,10 +313,10 @@
 	public void setUnitProperty(WordProperty unitProperty)	{
 		this.getLexicalTable().setUnitProperty(unitProperty);
 	}
-	
 
-	
-	
+
+
+
 	/**
 	 * Gets the type focus.
 	 *
@@ -383,11 +363,7 @@
 	public int getFrequenciesSum() throws StatException {
 		if (lexicalTable.getData() != null) {
 			return lexicalTable.getData().getTotal();
-		}
-		else if (lexicon != null) {
-			return lexicon.nbrOfToken();
-		}
-		else {
+		} else {
 			return 0;
 		}
 	}
@@ -400,7 +376,7 @@
 	 * @throws CqiClientException 
 	 */
 	public int[] getColumnsFrequenciesSums() throws StatException, CqiClientException {
-		
+
 		if(
 				//this.lexicalTable != null && 
 				this.lexicalTable.hasBeenComputedOnce())	{
@@ -416,31 +392,31 @@
 		else	{
 			return new int[] {0, 0};
 		}
-//		if (lexicalTable != null && this.subCorpus == null
-//				|| 
-//				) {
-//			try {
-//				Vector partSizes = lexicalTable.getColMarginsVector();
-//				if (colindex != null) {
-//					partSizes = partSizes.get(colindex);
-//				}
-//				return partSizes.asIntArray();
-//			}
-//			catch (Exception e) {
-//				return ((Partition)this.lexicalTable.getParent()).getPartSizes();
-//			}
-//		}
-//		else {
-//			try {
-//				return new int[] { subLexicon.nbrOfToken(), lexicon.nbrOfToken() - subLexicon.nbrOfToken() };
-//			}
-//			// case of Subcorpus specificities (the lexicons has not yet been computed)
-//			catch (Exception e) {
-//				return new int[] {0, 0};
-//			}
-//		}
+		//		if (lexicalTable != null && this.subCorpus == null
+		//				|| 
+		//				) {
+		//			try {
+		//				Vector partSizes = lexicalTable.getColMarginsVector();
+		//				if (colindex != null) {
+		//					partSizes = partSizes.get(colindex);
+		//				}
+		//				return partSizes.asIntArray();
+		//			}
+		//			catch (Exception e) {
+		//				return ((Partition)this.lexicalTable.getParent()).getPartSizes();
+		//			}
+		//		}
+		//		else {
+		//			try {
+		//				return new int[] { subLexicon.nbrOfToken(), lexicon.nbrOfToken() - subLexicon.nbrOfToken() };
+		//			}
+		//			// case of Subcorpus specificities (the lexicons has not yet been computed)
+		//			catch (Exception e) {
+		//				return new int[] {0, 0};
+		//			}
+		//		}
 	}
-	
+
 	/**
 	 * Gets the specificities index.
 	 * 
@@ -457,11 +433,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public String[] getTypeNames() throws Exception {
-		if (lexicalTable != null) {
-			return (rownames != null && rownames.size() != 0) ? rownames.toArray(new String[] {}) : lexicalTable.getRowNames().asStringsArray();
-		} else {
-			return lexicon.getForms();
-		}
+		return lexicalTable.getRowNames().asStringsArray();
 	}
 
 	/**
@@ -471,32 +443,7 @@
 	 * @throws StatException the stat exception
 	 */
 	public String[] getColumnsNames() throws StatException {
-		//		System.out.println("get col names: "+table);
-		//		System.out.println("colnames: "+colnames);
-		if (colnames != null && colnames.size() > 0) {
-			return colnames.toArray(new String[]{});
-		}
-		else if (this.subCorpus != null) {
-			return new String[] { this.subCorpus.getName(), this.corpus.getName() + " \\ " + this.subCorpus.getName() }; //$NON-NLS-1$
-		}
-		else if (lexicalTable != null) {
-			// return (colnames != null && colnames.size() != 0) ?
-			// colnames.toArray(new String[]{}) :
-			// table.getColNames().asStringsArray();
-			/*
-			 * List<Part> parts = table.getPartition().getOrderedParts(); String[]
-			 * partShortNames = new String[parts.size()]; for (int i = 0; i <
-			 * partShortNames.length; i++) { partShortNames[i] =
-			 * parts.get(i).getShortName(); }
-			 */
-			try {
-				return lexicalTable.getColNames().asStringsArray();
-			}
-			catch (Exception e) {
-				return ((Partition)this.lexicalTable.getParent()).getPartNames().toArray(new String[0]);
-			}
-		}
-		return new String[0];
+		return lexicalTable.getColNames().asStringsArray();
 	}
 
 	/**
@@ -509,33 +456,33 @@
 		//System.out.println("GET FREQUENCIES");
 		if (frequencies == null) {
 			//System.out.println("no frequencies");
-			if (lexicalTable != null) {
+//			if (lexicalTable != null) {
 				//System.out.println("FROM TABLE");
 				frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(lexicalTable.getData().getSymbol());
-				
-			}
-			else {// if table == null : subcorpus specif 
-				//System.out.println("FROM LEXICON");
-				frequencies = new int[lexicon.getFreq().length][2]; // build a frequency table from lexicons
-				String[] corpusforms = lexicon.getForms(); // all the forms
-				String[] subcorpusforms = subLexicon.getForms(); // all the forms
-				int[] corpusfreq = lexicon.getFreq(); // all the freqs
-				int[] subcorpusfreq = subLexicon.getFreq(); // all the freqs in the subcorpus
 
-				//				System.out.println("len subforms: "+subcorpusforms.length);
-				//				System.out.println("len subfreqs: "+subcorpusfreq.length);
-				 //get all forms
-				for (int i = 0 ; i < corpusforms.length ; i++) {
-					int j = 0; // find the index of the form in the subcorpus arrays
-					for (j = 0; j < subcorpusforms.length; j++) {
-						if (subcorpusforms[j].equals(corpusforms[i]))
-							break;// found the good form
-					}
-					if(j < subcorpusforms.length)
-						frequencies[i][0] = subcorpusfreq[j];
-					frequencies[i][1] = corpusfreq[i] - frequencies[i][0];
-				}
-			}
+//			}
+//			else {// if table == null : subcorpus specif 
+//				//System.out.println("FROM LEXICON");
+//				frequencies = new int[lexicon.getFreq().length][2]; // build a frequency table from lexicons
+//				String[] corpusforms = lexicon.getForms(); // all the forms
+//				String[] subcorpusforms = subLexicon.getForms(); // all the forms
+//				int[] corpusfreq = lexicon.getFreq(); // all the freqs
+//				int[] subcorpusfreq = subLexicon.getFreq(); // all the freqs in the subcorpus
+//
+//				//				System.out.println("len subforms: "+subcorpusforms.length);
+//				//				System.out.println("len subfreqs: "+subcorpusfreq.length);
+//				//get all forms
+//				for (int i = 0 ; i < corpusforms.length ; i++) {
+//					int j = 0; // find the index of the form in the subcorpus arrays
+//					for (j = 0; j < subcorpusforms.length; j++) {
+//						if (subcorpusforms[j].equals(corpusforms[i]))
+//							break;// found the good form
+//					}
+//					if(j < subcorpusforms.length)
+//						frequencies[i][0] = subcorpusfreq[j];
+//					frequencies[i][1] = corpusfreq[i] - frequencies[i][0];
+//				}
+//			}
 		}
 		return frequencies;
 	}
@@ -550,34 +497,18 @@
 	}
 
 	/**
-	 * Gets the lexicon.
-	 *
-	 * @return the lexicon
-	 */
-	public CQPLexicon getLexicon() {
-		return lexicon;
-	}
-
-
-
-	/**
 	 * The frequency in the whole corpus.
 	 *
 	 * @return the form frequencies
 	 * @throws StatException the stat exception
 	 */
 	public int[] getFormFrequencies() throws Exception {
-		if (lexicalTable != null) {
-			//System.out.println("get freq by table");
-			Vector formFrequencies = lexicalTable.getRowMarginsVector();
-			if (rowindex != null) {
-				formFrequencies = formFrequencies.get(rowindex);
-			}
-			return formFrequencies.asIntArray();
-		} else {
-			//System.out.println("freqs by lexicon of "+lexicon.getCorpus());
-			return lexicon.getFreq();
+		//System.out.println("get freq by table");
+		Vector formFrequencies = lexicalTable.getRowMarginsVector();
+		if (rowindex != null) {
+			formFrequencies = formFrequencies.get(rowindex);
 		}
+		return formFrequencies.asIntArray();
 	}
 
 	@Override
@@ -600,7 +531,6 @@
 		try {
 			getFrequencies();
 			getFormFrequencies();
-			getLexicon();
 			String[] names = getColumnsNames();
 			// if ("UTF-8".equals(encoding)) writer.write('\ufeff'); // UTF-8 BOM
 			//write column header
@@ -634,8 +564,6 @@
 		return true;
 	}
 
-
-
 	@Override
 	public void clean() {
 		try {
@@ -648,72 +576,69 @@
 		}
 	}
 
+	//	/**
+	//	 * Gets the symbol.
+	//	 *
+	//	 * @return the symbol
+	//	 */
+	//	public String getSymbol() {
+	//		return symbol;
+	//	}
 
+	//	/**
+	//	 * Gets the sorted part indexes.
+	//	 *
+	//	 * @return the sorted part indexes
+	//	 */
+	//	public int[] getSortedPartIndexes() {
+	//
+	//		try {
+	//			int[] indexes = new int[this.getNbrPart()];
+	//			String[] partsname = this.getPartShortNames().clone();
+	//			for (int i = 0; i < this.getNbrPart(); i++) {
+	//				indexes[i] = i;
+	//			}
+	//
+	//			for (int i = 0; i < this.getNbrPart(); i++) {
+	//				int imin = i;
+	//				for (int j = i; j < this.getNbrPart(); j++) {
+	//					if (partsname[imin].compareTo(partsname[j]) > 0) {
+	//						imin = j;
+	//					}
+	//				}
+	//				String tmp = partsname[i];
+	//				partsname[i] = partsname[imin];
+	//				partsname[imin] = tmp;
+	//
+	//				int tmp2 = indexes[i];
+	//				indexes[i] = indexes[imin];
+	//				indexes[imin] = tmp2;
+	//			}
+	//			return indexes;
+	//		} catch (StatException e) {
+	//			org.txm.utils.logger.Log.printStackTrace(e);
+	//		}
+	//		return new int[0];
+	//	}
 
-
-//	/**
-//	 * Gets the symbol.
-//	 *
-//	 * @return the symbol
-//	 */
-//	public String getSymbol() {
-//		return symbol;
-//	}
-
-//	/**
-//	 * Gets the sorted part indexes.
-//	 *
-//	 * @return the sorted part indexes
-//	 */
-//	public int[] getSortedPartIndexes() {
-//
-//		try {
-//			int[] indexes = new int[this.getNbrPart()];
-//			String[] partsname = this.getPartShortNames().clone();
-//			for (int i = 0; i < this.getNbrPart(); i++) {
-//				indexes[i] = i;
-//			}
-//
-//			for (int i = 0; i < this.getNbrPart(); i++) {
-//				int imin = i;
-//				for (int j = i; j < this.getNbrPart(); j++) {
-//					if (partsname[imin].compareTo(partsname[j]) > 0) {
-//						imin = j;
-//					}
-//				}
-//				String tmp = partsname[i];
-//				partsname[i] = partsname[imin];
-//				partsname[imin] = tmp;
-//
-//				int tmp2 = indexes[i];
-//				indexes[i] = indexes[imin];
-//				indexes[imin] = tmp2;
-//			}
-//			return indexes;
-//		} catch (StatException e) {
-//			org.txm.utils.logger.Log.printStackTrace(e);
-//		}
-//		return new int[0];
-//	}
-	
 	@Override
 	public String getName() {
 		// FIXME: to define
-//		if (this.specificitiesResult.getLexicalTable()!= null && this.specificitiesResult.getLexicalTable().getPartition() != null)	{
-//			setPartName(this.specificitiesResult.getLexicalTable().getPartition().getName()+": "+specificitiesResult.getName()); //$NON-NLS-1$
-//		} else if (spinput.getSubcorpus() != null) {
-//			setPartName(spinput.getSubcorpus().getName()+": "+specificitiesResult.getName()); //$NON-NLS-1$
-//		} else {
-//			setPartName(specificitiesResult.getName());
-//		}
+		//		if (this.specificitiesResult.getLexicalTable()!= null && this.specificitiesResult.getLexicalTable().getPartition() != null)	{
+		//			setPartName(this.specificitiesResult.getLexicalTable().getPartition().getName()+": "+specificitiesResult.getName()); //$NON-NLS-1$
+		//		} else if (spinput.getSubcorpus() != null) {
+		//			setPartName(spinput.getSubcorpus().getName()+": "+specificitiesResult.getName()); //$NON-NLS-1$
+		//		} else {
+		//			setPartName(specificitiesResult.getName());
+		//		}
 		// FIXME: to define
 		try {
-//			if (this.lexicalTable.getProperty() != null) {
-				return this.lexicalTable.getProperty().getName();
-//			}
-//			else {
-//				return this.lexicalTable.getParent().toString();
-//			}
+			//			if (this.lexicalTable.getProperty() != null) {
+			return this.lexicalTable.getProperty().getName();
+			//			}
+			//			else {
+			//				return this.lexicalTable.getParent().toString();
+			//			}
 		}
 		catch (Exception e) {
 			return this.getEmptyName();
@@ -724,29 +649,27 @@
 
 	@Override
 	public String getSimpleName() {
-		// FIXME: to define
 		return this.getName();
 	}
 
 	@Override
 	public String getDetails() {
-		// FIXME: to define
-		return this.getName();
+		return NLS.bind(this.getName()+" (max score={0})", this.maxScore);
 	}
 
 	@Override
 	public boolean canCompute() {
-		
+
 		if (this.lexicalTable == null) {
 			Log.severe("Specificities.canCompute(): can not compute without a lexical table.");
 			return false;
 		}
-				
-//		if (this.lexicalTable.getNColumns() < 2) {
-//			Log.severe(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
-//			return false;
-//		}
-		
+
+		//		if (this.lexicalTable.getNColumns() < 2) {
+		//			Log.severe(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
+		//			return false;
+		//		}
+
 		return true;
 	}
 
@@ -767,7 +690,7 @@
 		return true;
 	}
 
-	
+
 	/**
 	 * @return the maxScore
 	 */
@@ -787,8 +710,8 @@
 		return SpecificitiesCoreMessages.RESULT_TYPE;
 	}
 
-	
 
-	
 
+
+
 }
\ No newline at end of file
Index: tmp/org.txm.statsengine.core/src/org/txm/statsengine/core/utils/VectorizeArray.java
===================================================================
--- tmp/org.txm.statsengine.core/src/org/txm/statsengine/core/utils/VectorizeArray.java	(revision 1425)
+++ tmp/org.txm.statsengine.core/src/org/txm/statsengine/core/utils/VectorizeArray.java	(revision 1426)
@@ -113,13 +113,44 @@
 	 */
 	public final static int[] vectorizeByInner(int[][] matrix) {
 		if (matrix == null || matrix.length == 0) {
-			throw new IllegalArgumentException(StatsEngineCoreMessages.nothingToDoWithAnEmptyMatrix);
+			//throw new IllegalArgumentException(StatsEngineCoreMessages.nothingToDoWithAnEmptyMatrix);
+			return new int[0];
 		}
 		int inner_length = matrix[0].length;
+		return vectorizeByInner(matrix, inner_length);
+	}
+	
+	/**
+	 * Convert a <code>int * int</code> array in a <code>double</code> array.
+	 * Each inner array of the argument is added one after the other into the
+	 * result array.
+	 * 
+	 * <pre>
+	 * [
+	 * [1, 2, 3],
+	 * [4, 5, 6]
+	 * ]
+	 * </pre>
+	 * 
+	 * result in :
+	 * 
+	 * <pre>
+	 * [1, 2, 3, 4, 5, 6]
+	 * </pre>
+	 * 
+	 * that is, "row first".
+	 *
+	 * @param matrix a <code>int * int</code> array where all inner arrays have the
+	 * same length.
+	 * @return an array of <code>int</code> produced by vectorization of the
+	 * matrix.
+	 */
+	public final static int[] vectorizeByInner(int[][] matrix, int inner_length) {
+		
 		if (inner_length < 1) {
 			throw new IllegalArgumentException(StatsEngineCoreMessages.innerArraysMustBeOfDimensionSup0);
 		}
-		int[] vector = new int[matrix.length * matrix[0].length];
+		int[] vector = new int[matrix.length * inner_length];
 		for (int i = 0; i < matrix.length; i++) {
 			if (matrix[i] == null) {
 				throw new IllegalArgumentException(StatsEngineCoreMessages.anInnerArrayCannotBeNull);
@@ -159,7 +190,8 @@
 	 */
 	public final static double[] vectorizeByOuter(double[][] matrix) {
 		if (matrix == null || matrix.length == 0) {
-			throw new IllegalArgumentException(StatsEngineCoreMessages.nothingToDoWithAnEmptyMatrix);
+			//throw new IllegalArgumentException(StatsEngineCoreMessages.nothingToDoWithAnEmptyMatrix);
+			return new double[0];
 		}
 		int inner_length = matrix[0].length;
 		int outer_length = matrix.length;
