Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/LanguageDetector.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/LanguageDetector.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/LanguageDetector.java	(revision 31402)
@@ -43,8 +43,23 @@
 
         if(!new File(languageProfilesPath).exists()){
-            new File(languageProfilesPath).mkdir();
+            //new File(languageProfilesPath).mkdir();
+            new File(languageProfilesPath).mkdirs();
         }
-        File languageProfilesOutputFile1 = new File(languageProfilesPath + "/el");
+        File languageProfilesOutputFile1 = new File(languageProfilesPath + "/el");        
         File languageProfilesOutputFile2 = new File(languageProfilesPath +"/en");
+        
+        try {
+            System.out.println("languageProfilesOutputFile1.exists: " + languageProfilesOutputFile1.exists());
+            System.out.println("languageProfilesOutputFile1.getAbsolutePath(): " + languageProfilesOutputFile1.getAbsolutePath());
+            System.out.println("languageProfilesOutputFile1.canRead(): " + languageProfilesOutputFile1.canRead());
+            System.out.println("languageProfilesOutputFile1.canWrite(): " + languageProfilesOutputFile1.canWrite());
+            //System.out.println("languageProfilesOutputFile1.canRead(): " + languageProfilesOutputFile1.);
+            
+            languageProfilesOutputFile1.createNewFile();
+            languageProfilesOutputFile2.createNewFile();
+        } catch (IOException ex) {
+            Logger.getLogger(LanguageDetector.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        
         //languageProfilesOutputFile.mkdirs();
 
@@ -57,5 +72,5 @@
             Logger.getLogger(LanguageDetector.class.getName()).log(Level.SEVERE, null, ex);
         }
-        System.out.println("deb1");
+        //System.out.println("deb1");
 
         FileOutputStream outputStream2 = null;
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/SampleModelsExtractor.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/SampleModelsExtractor.java	(revision 31402)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/SampleModelsExtractor.java	(revision 31402)
@@ -0,0 +1,92 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.openstreetmap.josm.plugins.extractor;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+//import java.nio.charset.Charset;
+//import java.nio.charset.Charset;
+import java.util.Scanner;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+//import org.openstreetmap.josm.plugins.osmrec.OSMRecPluginHelper;
+
+/**
+ *
+ * @author imis-nkarag
+ */
+public class SampleModelsExtractor {
+
+    public void extractSampleSVMmodel(String modelName, String modelPath) {
+        InputStream svmModelStream;
+        FileOutputStream outputStream = null;
+
+        //File modelFile = new File(bestModelPath);
+        File targetFile = new File(modelPath);
+        try {
+            targetFile.createNewFile();
+        } catch (IOException ex) {
+            Logger.getLogger(SampleModelsExtractor.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        
+        //svmModelStream = SampleModelsExtractor.class.getResourceAsStream("/resources/profiles/el");
+        System.out.println("trying to get stream.. for " + "/resources/files/" + modelName);
+        svmModelStream = SampleModelsExtractor.class.getResourceAsStream("/resources/files/" + modelName);
+        
+        
+        //Scanner input = new Scanner(svmModelStream);
+        //svmModelStream.
+        
+        
+//            while (input.hasNext()) {
+//                String nextLine = input.nextLine();
+//
+//                //outputStream.write(nextLine.getBytes(Charset.forName("UTF-8")));
+//                System.out.println(nextLine);
+//                //outputStream.write(nextLine);
+//                //textualList.add(nextLine);
+//
+//            }       
+//            System.out.println("GER RESOURCE SUCCESS");
+            
+        try {
+            outputStream = new FileOutputStream(targetFile);
+            //Scanner input = new Scanner(svmModelStream);
+            
+            
+            int read = 0;
+            byte[] bytes = new byte[1024];
+
+            try {
+                while ((read = svmModelStream.read(bytes)) != -1) {
+                    outputStream.write(bytes, 0, read);
+                }
+            } catch (IOException ex) {
+                Logger.getLogger(SampleModelsExtractor.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        } catch (IOException ex) {
+            Logger.getLogger(SampleModelsExtractor.class.getName()).log(Level.SEVERE, null, ex);
+        } finally {
+            if (svmModelStream != null) {
+                try {
+                    svmModelStream.close();
+                } catch (IOException e) {
+                    Logger.getLogger(SampleModelsExtractor.class.getName()).log(Level.SEVERE, null, e);
+                }
+            }
+            if (outputStream != null) {
+                try {
+                    // outputStream.flush();
+                    outputStream.close();
+                } catch (IOException e) {
+                    Logger.getLogger(SampleModelsExtractor.class.getName()).log(Level.SEVERE, null, e);
+                }
+            }
+        }
+    }
+}
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/TextualListLoader.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/TextualListLoader.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/TextualListLoader.java	(revision 31402)
@@ -8,4 +8,5 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
+//import org.apache.log4j.Logger;
 
 /**
@@ -18,5 +19,6 @@
 public class TextualListLoader {
     
-    private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(TextualListLoader.class);
+    //private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(TextualListLoader.class);
+    //private static final Logger LOG = Logger.getLogger(TextualListLoader.class);
     private List<String> namesList;
     
@@ -36,5 +38,5 @@
                 namesList.add(nextLine);
             }
-        LOG.info("Name occurences parsed successfully!");
+        //LOG.info("Name occurences parsed successfully!");
         }
         
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java	(revision 31402)
@@ -126,4 +126,5 @@
 import org.openstreetmap.josm.plugins.core.TrainWorker;
 import org.openstreetmap.josm.plugins.extractor.LanguageDetector;
+import org.openstreetmap.josm.plugins.extractor.SampleModelsExtractor;
 import org.openstreetmap.josm.plugins.features.ClassFeatures;
 import org.openstreetmap.josm.plugins.features.GeometryFeatures;
@@ -159,5 +160,11 @@
     private static String MODEL_PATH;
     private static String TEXTUAL_LIST_PATH;
-
+    private static Map<String, List<String>> indirectClasses;
+    private static Map<String, Integer> indirectClassesWithIDs;
+    private static LanguageDetector languageDetector;
+    private static String bestModelPath;
+    private final String modelWithClassesPath;
+    
+    
     // Selection that we are editing by using both dialogs
     Collection<OsmPrimitive> sel;
@@ -186,9 +193,6 @@
         }
     };
+
     
-    private static Map<String, List<String>> indirectClasses;
-    private static Map<String, Integer> indirectClassesWithIDs;
-    private static LanguageDetector languageDetector;
-
     OSMRecPluginHelper(DefaultTableModel propertyData, Map<String, Map<String, Integer>> valueCount) {
         this.tagData = propertyData;
@@ -203,5 +207,13 @@
         MODEL_PATH = new File(MAIN_PATH).getParentFile() + "/OSMRec_models";
         TEXTUAL_LIST_PATH = MODEL_PATH + "/textualList.txt";
+        bestModelPath = MODEL_PATH + "/best_model";
+        modelWithClassesPath = MODEL_PATH + "/model_with_classes";
         languageDetector = LanguageDetector.getInstance(MODEL_PATH + "/profiles");
+
+        SampleModelsExtractor sa = new SampleModelsExtractor();
+        
+        sa.extractSampleSVMmodel("best_model", bestModelPath);
+        sa.extractSampleSVMmodel("model_with_classes", modelWithClassesPath);
+        
     }
 
@@ -1483,4 +1495,5 @@
             configureContextsensitiveHelp("/Dialog/AddValue", true /* show help button */);
             final AddTagsDialog lala = this;
+
             
             loadOntology();
@@ -1497,5 +1510,7 @@
             }
             
-           
+            //if training process has not been performed, we use two sample SVM models, extracted from the jar
+            //File bestModelFile = new File(bestModelPath);
+            //File bestModelWithClassesFile = new File(modelWithClassesPath);
 
             JPanel splitPanel = new JPanel(new BorderLayout(10,10));            
@@ -1629,6 +1644,9 @@
             //get a simple selection
             if(!osmPrimitiveSelection.isEmpty()){
-                s = osmPrimitiveSelection.get(0);                       
-                if(s.getInterestingTags().isEmpty()){
+                s = osmPrimitiveSelection.get(0);     
+                File modelDirectory = new File(MODEL_PATH);
+                String modelWithClassesPath = modelDirectory.getAbsolutePath() + "/model_with_classes";
+                File modelWithClassesFile = new File(modelWithClassesPath); 
+                if(s.getInterestingTags().isEmpty() || !modelWithClassesFile.exists()){
                     loadSVMmodel(false);//load original model
                     createOSMObject(sel, false); //create object without class features
@@ -1650,5 +1668,5 @@
                 public void valueChanged(ListSelectionEvent listSelectionEvent) {
                     if (!listSelectionEvent.getValueIsAdjusting()) {//This prevents double events
-                        System.out.println("tag selected: " + categoryList.getSelectedValue());
+                        //System.out.println("tag selected: " + categoryList.getSelectedValue());
                         
                         String selectedClass = categoryList.getSelectedValue();
@@ -2094,5 +2112,5 @@
 
                         mapLabelsToIDs.put(modelSVMLabels[h], h);
-                        System.out.println(h + "   <->    " + modelSVMLabels[h]);
+                        //System.out.println(h + "   <->    " + modelSVMLabels[h]);
 
                     } 
@@ -2211,5 +2229,5 @@
                     }
                 }
-                System.out.println("final list:" + scoreMap);
+                //System.out.println("final list:" + scoreMap);
             }           
         }
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Mapper.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Mapper.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Mapper.java	(revision 31402)
@@ -4,5 +4,7 @@
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+import java.util.Collections;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Scanner;
@@ -17,5 +19,5 @@
 
 public class Mapper {
-    private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(Mapper.class);
+    //private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(Mapper.class);
     private final HashMap<String, String> mappings;
     private final HashMap<String, Integer> mappingsWithIDs;
@@ -23,5 +25,5 @@
     public Mapper(){    
     
-       mappings = new HashMap<>();
+       mappings = new LinkedHashMap<>();
        mappingsWithIDs = new HashMap<>();
     
@@ -45,6 +47,6 @@
         }
         constructMappingsWithIDs();
-         
-    LOG.info("Mappings file parsed successfully!");     
+        System.out.println("Mappings file parsed successfully!");
+        //LOG.info("Mappings file parsed successfully!");     
     } 
     
@@ -58,9 +60,9 @@
     
     public Map<String,Integer> getMappingsWithIDs(){
-        return this.mappingsWithIDs;
+        return Collections.unmodifiableMap(mappingsWithIDs);
     }
     
     public Map<String,String> getMappings(){
-        return this.mappings;
+        return Collections.unmodifiableMap(mappings);
     }        
 }
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Ontology.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Ontology.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Ontology.java	(revision 31402)
@@ -50,15 +50,15 @@
         ontologyModel = ModelFactory.createOntologyModel();                
         
-        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.ERROR); 
+        //org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.ERROR); 
         ontologyModel.read(owlFile, null);    //Hide RDFDefaultErrorHandler from terminal to keep clear output.
-        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.INFO);
+        //org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.INFO);
    
         listHierarchy = ontologyModel.listHierarchyRootClasses().toList();
         setListHierarchy(listHierarchy);  
         
-        ExtendedIterator classes = ontologyModel.listClasses();
+        ExtendedIterator<OntClass> classes = ontologyModel.listClasses();
         while (classes.hasNext()) {
             String className;
-            OntClass obj = (OntClass) classes.next();           
+            OntClass obj = classes.next();           
             
             //compare localname with class name from map and call getSuperclass     
Index: applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/TextualStatistics.java
===================================================================
--- applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/TextualStatistics.java	(revision 31108)
+++ applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/TextualStatistics.java	(revision 31402)
@@ -3,4 +3,5 @@
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Scanner;
@@ -30,5 +31,5 @@
         
         public List<String> getTextualList(){
-            return textualList;
+            return Collections.unmodifiableList(textualList);
         }
 }
