code: public void init(String modelDir) {
  		//Read feature template file
  		String templateFile = modelDir + File.separator + "featuretemplate.xml";
  		Vector<Element> nodes = BasicContextGenerator.readFeatureNodes(templateFile); 
  		
  		for (int i = 0; i < nodes.size(); ++i){
  			Element node = nodes.get(i);
  			String cpType = node.getAttribute("value");
  			BasicContextGenerator contextGen = null;
  			
  			if (cpType.equals("Conjunction")){
  				contextGen = new ConjunctionContextGenerator(node);
  			}
  			else if (cpType.equals("Lexicon")){
  				contextGen = new LexiconContextGenerator(node);	
  				LexiconContextGenerator.loadVietnameseDict(modelDir + File.separator + "VNDic_UTF-8.txt");
  				LexiconContextGenerator.loadViLocationList(modelDir + File.separator + "vnlocations.txt");
  				LexiconContextGenerator.loadViPersonalNames(modelDir + File.separator + "vnpernames.txt");
  			}
  			else if (cpType.equals("Regex")){
  				contextGen = new RegexContextGenerator(node);
  			}
  			else if (cpType.equals("SyllableFeature")){
  				contextGen = new SyllableContextGenerator(node);
  			}
  			else if (cpType.equals("ViSyllableFeature")){
  				contextGen = new VietnameseContextGenerator(node);
  			}
  			
  			if (contextGen != null)
  				dataTagger.addContextGenerator(contextGen);
  		}
  		
  		//create context generators
  		labeling = new Labeling(modelDir, dataTagger, reader, writer);
  	}
docs: Inits the.
  
  @param modelDir the model dir