Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/PrepareAFVOIXOFFCorpusMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/PrepareAFVOIXOFFCorpusMacro.groovy	(revision 2968)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/projects/antract/PrepareAFVOIXOFFCorpusMacro.groovy	(revision 2969)
@@ -62,8 +62,8 @@
 backtomedia/sync_mode=Structure
 concordance/context_limits=text
 concordance/context_limits_type=list
-concordance/view_reference_pattern={"format"\\:"","properties"\\:["text_datedediffusion","u_time","div_identifiantdelanotice"]}
-concordance/sort_reference_pattern={"format"\\:"","properties"\\:["text_datedediffusion","u_time","div_identifiantdelanotice"]}
+concordance/view_reference_pattern={"format"\\:"","properties"\\:["text_date-de-diffusion","u_time","div_identifiant-de-la-notice"]}
+concordance/sort_reference_pattern={"format"\\:"","properties"\\:["text_date-de-diffusion","u_time","div_identifiant-de-la-notice"]}
 concordance/name=concordance
 eclipse.preferences.version=1"""
 
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy	(revision 2968)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/importer.groovy	(revision 2969)
@@ -52,6 +52,7 @@
 import java.util.HashMap;
 import org.txm.scripts.importer.*;
 import org.txm.utils.*;
+import org.txm.objects.Project;
 import org.txm.metadatas.*;
 
 /**
@@ -82,6 +83,8 @@
 	Metadatas metadatas;
 
 	String lang; // language used by the tokenizer
+	
+	Project corpusProject;
 
 	/**
 	 * Instantiates a new importer.
@@ -90,12 +93,13 @@
 	 * @param outdir the outdir
 	 * @param metadatas the metadatas
 	 */
-	public importer(ArrayList<File> trsfiles, File binDir, File txmDir, Metadatas metadatas, lang) {
+	public importer(ArrayList<File> trsfiles, File binDir, File txmDir, Metadatas metadatas, lang, Project corpusProject) {
 		this.trsfiles = trsfiles;
 		this.txmDir = txmDir;
 		this.binDir = binDir;
 		this.metadatas = metadatas;
 		this.lang = lang;
+		this.corpusProject = corpusProject;
 	}
 
 	/**
@@ -245,6 +249,13 @@
 			}
 		}
 
+		String cleanDirectories = corpusProject.getCleanAfterBuild();
+		if ("true".equals(cleanDirectories)) {
+			new File(corpusProject.getProjectDirectory(), "tokenized").deleteDir()
+			new File(corpusProject.getProjectDirectory(), "src").deleteDir()
+			new File(corpusProject.getProjectDirectory(), "split").deleteDir()
+		}
+		
 		cpb.done()
 				
 		return txmDir.listFiles() != null;
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2968)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2969)
@@ -67,28 +67,28 @@
 String userDir = System.getProperty("user.home");
 
 def MONITOR;
-Project project;
+Project corpusProject;
 
-try {project=projectBinding;MONITOR=monitor} catch (Exception)
+try {corpusProject=projectBinding;MONITOR=monitor} catch (Exception)
 {	}
-if (project == null) { println "no project set. Aborting"; return; }
+if (corpusProject == null) { println "no project set. Aborting"; return; }
 
-String corpusname = project.getName();
+String corpusname = corpusProject.getName();
 String basename = corpusname
-String rootDir = project.getSrcdir();
-String lang = project.getLang()
+String rootDir = corpusProject.getSrcdir();
+String lang = corpusProject.getLang()
 String model = lang
-String encoding = project.getEncoding()
-boolean annotate = project.getAnnotate()
-String xsl = project.getFrontXSL();
-def xslParams = project.getXsltParameters();
-int wordsPerPage = project.getEditionDefinition("default").getWordsPerPage()
-String page_element = project.getEditionDefinition("default").getPageElement()
-boolean build_edition = project.getEditionDefinition("default").getBuildEdition()
-boolean update = project.getDoUpdate()
+String encoding = corpusProject.getEncoding()
+boolean annotate = corpusProject.getAnnotate()
+String xsl = corpusProject.getFrontXSL();
+def xslParams = corpusProject.getXsltParameters();
+int wordsPerPage = corpusProject.getEditionDefinition("default").getWordsPerPage()
+String page_element = corpusProject.getEditionDefinition("default").getPageElement()
+boolean build_edition = corpusProject.getEditionDefinition("default").getBuildEdition()
+boolean update = corpusProject.getDoUpdate()
 
 File srcDir = new File(rootDir);
-File binDir = project.getProjectDirectory();
+File binDir = corpusProject.getProjectDirectory();
 binDir.mkdirs();
 if (!binDir.exists()) {
 	println "Could not create binDir "+binDir
@@ -195,7 +195,7 @@
 		if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
 		if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
 		println "-- IMPORTER"
-		def imp = new importer(trsfiles, binDir, txmDir, metadatas, lang) //put result in the txm folder of binDir
+		def imp = new importer(trsfiles, binDir, txmDir, metadatas, lang, corpusProject) //put result in the txm folder of binDir
 		if (!imp.run()) {
 			println "Failed to prepare files - Aborting";
 			return;
@@ -245,6 +245,13 @@
 			def engine = Toolbox.getEngineManager(EngineType.ANNOTATION).getEngine("TreeTagger")
 			if (engine.processDirectory(txmDir, binDir, ["lang":model])) {
 				annotationSuccess = true;
+				
+				String cleanDirectories = corpusProject.getCleanAfterBuild();
+				if ("true".equals(cleanDirectories)) {
+					new File(corpusProject.getProjectDirectory(), "ptreetagger").deleteDir()
+					new File(corpusProject.getProjectDirectory(), "treetagger").deleteDir()
+					new File(corpusProject.getProjectDirectory(), "annotations").deleteDir()
+				}
 			}
 		}
 	} // end of importer and annotate steps
@@ -280,7 +287,7 @@
 	if(debug) comp.setDebug();
 	comp.removeInterviewers(removeInterviewer);
 	comp.setIgnoreTranscriberMetadata(ignoreTranscriberMetadata);
-	if (!comp.run(project, xmltxmFiles, corpusname, "default", binDir)) {
+	if (!comp.run(corpusProject, xmltxmFiles, corpusname, "default", binDir)) {
 		println "Failed to compile files";
 		return;
 	}
@@ -308,9 +315,9 @@
 			List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
 			List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
 
-			Text t = project.getText(txtname)
+			Text t = corpusProject.getText(txtname)
 			if (t == null) {
-				t = new Text(project);
+				t = new Text(corpusProject);
 				t.setName(txtname);
 			}
 			t.setSourceFile(txmFile)
@@ -340,7 +347,6 @@
 		File cssfile = new File(Toolbox.getTxmHomePath(), "css/transcriber.css")
 		File cssTXMFile = new File(Toolbox.getTxmHomePath(), "css/txm.css")
 		if (cssfile.exists() && htmlDir.exists()) {
-			FileCopy.copy(cssfile, new File(htmlDir, "onepage/transcriber.css"));
 			FileCopy.copy(cssfile, new File(htmlDir, "default/txm.css"));
 			FileCopy.copy(cssfile, new File(htmlDir, "default/transcriber.css"));
 		}
@@ -353,10 +359,10 @@
 			String txtname = txmFile.getName();
 			int i = txtname.lastIndexOf(".");
 			if(i > 0) txtname = txtname.substring(0, i);
-			File mediaFile = new File(project.getSrcdir(), txtname + ".mp3")
-			if (!mediaFile.exists()) mediaFile = new File(project.getSrcdir(), txtname + ".wav")
-			if (!mediaFile.exists()) mediaFile = new File(project.getSrcdir(), txtname + ".mp4")
-			if (!mediaFile.exists()) mediaFile = new File(project.getSrcdir(), txtname + ".avi")
+			File mediaFile = new File(corpusProject.getSrcdir(), txtname + ".mp3")
+			if (!mediaFile.exists()) mediaFile = new File(corpusProject.getSrcdir(), txtname + ".wav")
+			if (!mediaFile.exists()) mediaFile = new File(corpusProject.getSrcdir(), txtname + ".mp4")
+			if (!mediaFile.exists()) mediaFile = new File(corpusProject.getSrcdir(), txtname + ".avi")
 
 			if (mediaFile.exists()) {
 				File copy = new File(binDir, "media/"+mediaFile.getName())
@@ -371,4 +377,4 @@
 
 if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
 if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-readyToLoad = project.save();
+readyToLoad = corpusProject.save();
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2968)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2969)
@@ -117,7 +117,7 @@
 	 * @param outdir the outdir
 	 * @return true, if successful
 	 */
-	public boolean run(Project project, List<File> xmlfiles, String corpusname, String projectname, File binDir) {
+	public boolean run(Project corpusProject, List<File> xmlfiles, String corpusname, String projectname, File binDir) {
 		
 		//println "run compiler with $xmlfiles, $basename and $outdir"
 		this.outdir = binDir;
@@ -129,17 +129,17 @@
 
 		sectionAttrs = new HashSet<String>() // reset section attributs set
 
-		CorpusBuild corpus = project.getCorpusBuild(project.getName(), MainCorpus.class);
+		CorpusBuild corpus = corpusProject.getCorpusBuild(corpusProject.getName(), MainCorpus.class);
 		if (corpus != null) {
-			if (project.getDoUpdate()) {
+			if (corpusProject.getDoUpdate()) {
 				corpus.clean(); // remove old files
 			} else {
 				corpus.delete(); // remove old files and TXMResult children
 			}
 		} else {
-			corpus = new MainCorpus(project);
-			corpus.setID(project.getName());
-			corpus.setName(project.getName());
+			corpus = new MainCorpus(corpusProject);
+			corpus.setID(corpusProject.getName());
+			corpus.setName(corpusProject.getName());
 		}
 		corpus.setDescription("Built with the XML-TRS import module");
 		
@@ -237,6 +237,11 @@
 
 		} catch (Exception ex) {System.out.println(ex); return false;}
 
+		String cleanDirectories = corpusProject.getCleanAfterBuild();
+		if ("true".equals(cleanDirectories)) {
+			new File(corpusProject.getProjectDirectory(), "cqp").deleteDir()
+		}
+		
 		return true;
 	}
 
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 2968)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportModuleCustomization.java	(revision 2969)
@@ -4,33 +4,50 @@
 
 /**
  * static class that defines what parameters are used by import modules
+ * 
  * @author mdecorde
  *
  */
 public class ImportModuleCustomization {
 	
 	public static final String PARALLEL = "parallel"; //$NON-NLS-1$
+	
 	public static final String ENCODING = "encoding"; //$NON-NLS-1$
+	
 	public static final String LANG = "lang"; //$NON-NLS-1$
+	
 	public static final String XSLT = "xslt"; //$NON-NLS-1$
+	
 	public static final String TOKENIZER = "tokenizer"; //$NON-NLS-1$
+	
 	public static final String ADVANCEDTOKENIZER = "tokenizer-advanced"; //$NON-NLS-1$
+	
 	public static final String EDITIONS_WORDSPERPAGE = "editions-wordsperpage"; //$NON-NLS-1$
+	
 	public static final String EDITIONS_PAGEELEMENT = "editions-pageelement"; //$NON-NLS-1$
+	
 	public static final String PATTRIBUTES = "pAttributes"; //$NON-NLS-1$
+	
 	public static final String SATTRIBUTES = "sAttributes"; //$NON-NLS-1$
+	
 	public static final String PREBUILD = "preBuild"; //$NON-NLS-1$
+	
 	public static final String QUERIES = "queries"; //$NON-NLS-1$
+	
 	public static final String UI = "uis"; //$NON-NLS-1$
+	
 	public static final String OPTIONS = "options"; //$NON-NLS-1$
+	
 	public static final String TEXTUALPLANS = "textualplans";
+	
 	public static final String IMPORT_NAME = "import_name";
 	
-	static HashMap<String, HashMap<String, Boolean>> allParams = new HashMap<String, HashMap<String, Boolean>>();
-	static HashMap<String, String> names = new HashMap<String, String>();
+	static HashMap<String, HashMap<String, Boolean>> allParams = new HashMap<>();
 	
-	static { //init import module
-		HashMap<String,Boolean> params = new HashMap<String, Boolean>();
+	static HashMap<String, String> names = new HashMap<>();
+	
+	static { // init import module
+		HashMap<String, Boolean> params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, true);
 		params.put(LANG, false);
@@ -49,7 +66,7 @@
 		allParams.put("discoursLoader.groovy", params); //$NON-NLS-1$
 		names.put("discoursLoader.groovy", "CNR + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, true);
 		params.put(LANG, true);
@@ -68,7 +85,7 @@
 		allParams.put("cqpLoader.groovy", params); //$NON-NLS-1$
 		names.put("cqpLoader.groovy", "CQP"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, true);
 		params.put(LANG, true);
@@ -87,7 +104,7 @@
 		allParams.put("hyperbaseLoader.groovy", params); //$NON-NLS-1$
 		names.put("hyperbaseLoader.groovy", "Hyperbase"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, true);
 		params.put(LANG, true);
@@ -106,7 +123,7 @@
 		allParams.put("alcesteLoader.groovy", params); //$NON-NLS-1$
 		names.put("alcesteLoader.groovy", "Alceste"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, true);
 		params.put(LANG, true);
@@ -125,7 +142,7 @@
 		allParams.put("txtLoader.groovy", params); //$NON-NLS-1$
 		names.put("txtLoader.groovy", "TXT + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -140,11 +157,11 @@
 		params.put(QUERIES, true);
 		params.put(UI, true);
 		params.put(TEXTUALPLANS, false);
-		params.put(OPTIONS, false);
+		params.put(OPTIONS, true);
 		allParams.put("transcriberLoader.groovy", params); //$NON-NLS-1$
 		names.put("transcriberLoader.groovy", "XML-TRS + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -163,7 +180,7 @@
 		allParams.put("tmxLoader.groovy", params); //$NON-NLS-1$
 		names.put("tmxLoader.groovy", "XML-TMX"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -182,7 +199,7 @@
 		allParams.put("xmlLoader.groovy", params); //$NON-NLS-1$
 		names.put("xmlLoader.groovy", "XML/w + CSV"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -201,7 +218,7 @@
 		allParams.put("xmltxmLoader.groovy", params); //$NON-NLS-1$
 		names.put("xmltxmLoader.groovy", "XML-TEI TXM"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -220,7 +237,7 @@
 		allParams.put("factivaLoader.groovy", params); //$NON-NLS-1$
 		names.put("factivaLoader.groovy", "XML-PPS"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -239,7 +256,7 @@
 		allParams.put("factivamailLoader.groovy", params); //$NON-NLS-1$
 		names.put("factivamailLoader.groovy", "Factiva TXT"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -258,7 +275,7 @@
 		allParams.put("bfmLoader.groovy", params); //$NON-NLS-1$
 		names.put("bfmLoader.groovy", "XML-TEI BFM"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -277,7 +294,7 @@
 		allParams.put("frantextLoader.groovy", params); //$NON-NLS-1$
 		names.put("frantextLoader.groovy", "XML-TEI Frantext"); //$NON-NLS-1$ //$NON-NLS-2$
 		
-		params = new HashMap<String, Boolean>();
+		params = new HashMap<>();
 		params.put(PARALLEL, false);
 		params.put(ENCODING, false);
 		params.put(LANG, true);
@@ -302,12 +319,12 @@
 	 * @param importscript
 	 * @return the import parameter section configuration depending on the <code>importscript</code>. If their is no setting for <code>importscript</code> return a default configuration
 	 */
-	public static HashMap<String,Boolean> getParameters(String importscript)
-	{
+	public static HashMap<String, Boolean> getParameters(String importscript) {
 		if (allParams.containsKey(importscript)) {
 			return allParams.get(importscript);
-		} else {
-			HashMap<String, Boolean> params = new HashMap<String, Boolean>();
+		}
+		else {
+			HashMap<String, Boolean> params = new HashMap<>();
 			params.put(PARALLEL, true);
 			params.put(ENCODING, true);
 			params.put(LANG, true);
@@ -327,11 +344,11 @@
 		}
 	}
 	
-	public static String getName(String importscript)
-	{
+	public static String getName(String importscript) {
 		if (allParams.containsKey(importscript)) {
 			return names.get(importscript);
-		} else {
+		}
+		else {
 			return importscript;
 		}
 	}
