// Path: utils-basickit/src/main/java/com/cognitionis/utils_basickit/XmlAttribs.java
// public class XmlAttribs {
// 
// 
//      public static HashMap<String, String> parseAttrs(String attrs) {
//         // if separated by blanks or consists of only one argument with a quoted value use XML
//         if(attrs.matches(".*=\"[^\"]*\"\\s+.*") || attrs.matches("[^=]*=\"[^\"]*\"")){
//             return parseXMLattrs(attrs);
//         }else{ // otherwise use ";" separator that handles both quoted and un quoted values
//             return parseSemiColonAttrs(attrs);
//         }
//      }
// 
//      public static HashMap<String, String> parseXMLattrs(String attrs) {
//         HashMap<String, String> parsed_attrs=null;
//         try{
//         attrs=attrs.trim().replaceAll("\\s+", " ");
//         if(attrs.endsWith("\"")){attrs=attrs.substring(0, attrs.length()-1);}
//         String[] attrs_arr = attrs.split("\" ");
//         parsed_attrs = new HashMap<String, String>();
//         for (int i = 0; i < attrs_arr.length; i++) {
//             if (attrs_arr[i].matches("[^=]+=\"[^=]+")) {
//                 parsed_attrs.put(attrs_arr[i].substring(0, attrs_arr[i].indexOf("=\"")), attrs_arr[i].substring(attrs_arr[i].indexOf("=\"") + 2));
//             }
//         }
//         } catch (Exception e) {
//             System.err.println("Errors found (XmlAttribs):\n\t" + e.toString() + "\n");
//             if (System.getProperty("DEBUG") != null && System.getProperty("DEBUG").equalsIgnoreCase("true")) {
//                 e.printStackTrace(System.err);
//                 System.exit(1);
//             }
//             return null;
//         }
//         return parsed_attrs;
//     }
// 
//      public static HashMap<String, String> parseSemiColonAttrs(String attrs) {
//         HashMap<String, String> parsed_attrs=null;
//         try{
//         String[] attrs_arr = attrs.trim().replaceAll("\\s+", " ").split(";");
//         parsed_attrs = new HashMap<String, String>();
//         for (int i = 0; i < attrs_arr.length; i++) {
//             if (attrs_arr[i].matches("[^=]+=[^=]+")) {
//                 String name=attrs_arr[i].substring(0, attrs_arr[i].indexOf('='));
//                 String value=attrs_arr[i].substring(attrs_arr[i].indexOf('=') + 1);
//                 if (value.matches("\".*\"")) {
//                     value = value.substring(1, value.length() - 1);
//                 }
//                 parsed_attrs.put(name, value);
//             }
//         }
//         } catch (Exception e) {
//             System.err.println("Errors found (XmlAttribs):\n\t" + e.toString() + "\n");
//             if (System.getProperty("DEBUG") != null && System.getProperty("DEBUG").equalsIgnoreCase("true")) {
//                 e.printStackTrace(System.err);
//                 System.exit(1);
//             }
//             return null;
//         }
//         return parsed_attrs;
//     }
// 
// 
// 
// 
// }


import java.io.*;
import java.util.*;
import com.cognitionis.nlp_files.*;
import com.cognitionis.utils_basickit.XmlAttribs;
                }
                throw new Exception("Some of the required columns (element,word/token,POS) not found: " + notFoundCol);
            }




            String pipeslineant = "--prior first line--";

            try {
                String line;
                String[] linearr;
                HashMap<String, String> tempexAttribsHash = null;
                while ((line = pipesreader.readLine()) != null) {
                    numline++;
                    linearr = line.split("\\|");

                    if (linearr.length >= pipesfile.getPipesDescArrCount()) {
                        if (linearr[iob2col].matches("B-.*")) {
                            if (!word.equals("")) {
                                outfile.write(id + "|" + word + "|" + tense + "|"+DCTs.get(file)[0]+"\n");
                                id = "";
                                word = "";
                                tense = "";
                            }

                            word = linearr[tokencol];
                            tense = linearr[tensecol];
                            file = linearr[filecol];
                            if (linearr[attrscol].matches(".*=.*=.*") && !linearr[attrscol].contains(";")) {
// Path: utils-basickit/src/main/java/com/cognitionis/utils_basickit/XmlAttribs.java
// public class XmlAttribs {
// 
// 
//      public static HashMap<String, String> parseAttrs(String attrs) {
//         // if separated by blanks or consists of only one argument with a quoted value use XML
//         if(attrs.matches(".*=\"[^\"]*\"\\s+.*") || attrs.matches("[^=]*=\"[^\"]*\"")){
//             return parseXMLattrs(attrs);
//         }else{ // otherwise use ";" separator that handles both quoted and un quoted values
//             return parseSemiColonAttrs(attrs);
//         }
//      }
// 
//      public static HashMap<String, String> parseXMLattrs(String attrs) {
//         HashMap<String, String> parsed_attrs=null;
//         try{
//         attrs=attrs.trim().replaceAll("\\s+", " ");
//         if(attrs.endsWith("\"")){attrs=attrs.substring(0, attrs.length()-1);}
//         String[] attrs_arr = attrs.split("\" ");
//         parsed_attrs = new HashMap<String, String>();
//         for (int i = 0; i < attrs_arr.length; i++) {
//             if (attrs_arr[i].matches("[^=]+=\"[^=]+")) {
//                 parsed_attrs.put(attrs_arr[i].substring(0, attrs_arr[i].indexOf("=\"")), attrs_arr[i].substring(attrs_arr[i].indexOf("=\"") + 2));
//             }
//         }
//         } catch (Exception e) {
//             System.err.println("Errors found (XmlAttribs):\n\t" + e.toString() + "\n");
//             if (System.getProperty("DEBUG") != null && System.getProperty("DEBUG").equalsIgnoreCase("true")) {
//                 e.printStackTrace(System.err);
//                 System.exit(1);
//             }
//             return null;
//         }
//         return parsed_attrs;
//     }
// 
//      public static HashMap<String, String> parseSemiColonAttrs(String attrs) {
//         HashMap<String, String> parsed_attrs=null;
//         try{
//         String[] attrs_arr = attrs.trim().replaceAll("\\s+", " ").split(";");
//         parsed_attrs = new HashMap<String, String>();
//         for (int i = 0; i < attrs_arr.length; i++) {
//             if (attrs_arr[i].matches("[^=]+=[^=]+")) {
//                 String name=attrs_arr[i].substring(0, attrs_arr[i].indexOf('='));
//                 String value=attrs_arr[i].substring(attrs_arr[i].indexOf('=') + 1);
//                 if (value.matches("\".*\"")) {
//                     value = value.substring(1, value.length() - 1);
//                 }
//                 parsed_attrs.put(name, value);
//             }
//         }
//         } catch (Exception e) {
//             System.err.println("Errors found (XmlAttribs):\n\t" + e.toString() + "\n");
//             if (System.getProperty("DEBUG") != null && System.getProperty("DEBUG").equalsIgnoreCase("true")) {
//                 e.printStackTrace(System.err);
//                 System.exit(1);
//             }
//             return null;
//         }
//         return parsed_attrs;
//     }
// 
// 
// 
// 
// }


// Path: feature-builder/src/main/java/com/cognitionis/feature_builder/Timen.java
import java.io.*;
import java.util.*;
import com.cognitionis.nlp_files.*;
import com.cognitionis.utils_basickit.XmlAttribs;

                }
                throw new Exception("Some of the required columns (element,word/token,POS) not found: " + notFoundCol);
            }




            String pipeslineant = "--prior first line--";

            try {
                String line;
                String[] linearr;
                HashMap<String, String> tempexAttribsHash = null;
                while ((line = pipesreader.readLine()) != null) {
                    numline++;
                    linearr = line.split("\\|");

                    if (linearr.length >= pipesfile.getPipesDescArrCount()) {
                        if (linearr[iob2col].matches("B-.*")) {
                            if (!word.equals("")) {
                                outfile.write(id + "|" + word + "|" + tense + "|"+DCTs.get(file)[0]+"\n");
                                id = "";
                                word = "";
                                tense = "";
                            }

                            word = linearr[tokencol];
                            tense = linearr[tensecol];
                            file = linearr[filecol];
                            if (linearr[attrscol].matches(".*=.*=.*") && !linearr[attrscol].contains(";")) {
                                tempexAttribsHash = XmlAttribs.parseXMLattrs(linearr[attrscol]);