/**
   * Initialises the FeatureExtractor from a set of parameters, for example sent as command-line
   * arguments
   *
   * @param args The list of arguments
   */
  public AbstractFeatureExtractor(String[] args) {
    setWorkDir(System.getProperty("user.dir"));
    new Logger("log.txt");
    parseArguments(args);

    setInput(workDir + File.separator + resourceManager.getString("input"));
    setOutput(output = workDir + File.separator + resourceManager.getString("output"));
  }
  /**
   * constructs the folders required by the application. These are, typically: <br>
   *
   * <ul>
   *   <li>/input and subfolders
   *       <ul>
   *         <li>/input/<i>sourceLang</i>, /input/<i>targetLang</i> (for storing the results of
   *             processing the input files with various tools, such as pos tagger, transliterator,
   *             morphological analyser),<br>
   *         <li>/input/systems/<i>systemName</i> (for storing system specific resources - for
   *             example, the compiled and processed word lattices in the case of the IBM system
   *       </ul>
   *   <li>/output (for storing the resulting feature files),
   * </ul>
   *
   * Subclasses can override this method to construct, for example, subfolders of the systems folder
   * for each available MT system, or temporary folders
   */
  public void constructFolders() {

    File f = new File(input);
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }

    f = new File(input + File.separator + sourceLang);
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }
    f = new File(input + File.separator + targetLang);
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }
    f = new File(input + File.separator + targetLang + File.separator + "temp");
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }

    f = new File(input + File.separator + "systems");
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }

    String output = resourceManager.getString("output");
    f = new File(output);
    if (!f.exists()) {
      f.mkdir();
      System.out.println("folder created " + f.getPath());
    }
  }