Examples of DepFtrMap


Examples of clear.ftr.map.DepFtrMap

      throws IOException {
    ZipInputStream zin = new ZipInputStream(inputStream);
    ZipEntry zEntry;

    DepFtrXml xml = null;
    DepFtrMap map = null;
    AbstractMultiDecoder decoder = null;

    while ((zEntry = zin.getNextEntry()) != null) {
      if (zEntry.getName().equals(ENTRY_FEATURE)) {
        System.out.println("- loading feature template");

        BufferedReader reader = new BufferedReader(new InputStreamReader(zin));
        StringBuilder build = new StringBuilder();
        String string;

        while ((string = reader.readLine()) != null) {
          build.append(string);
          build.append("\n");
        }

        xml = new DepFtrXml(new ByteArrayInputStream(build.toString().getBytes()));
      }

      if (zEntry.getName().equals(ENTRY_LEXICA)) {
        System.out.println("- loading lexica");
        map = new DepFtrMap(xml);
        map.load(new BufferedReader(new InputStreamReader(zin)));
      } else if (zEntry.getName().equals(ENTRY_MODEL)) {
        System.out.println("- loading model");
        decoder = new OneVsAllDecoder(new BufferedReader(new InputStreamReader(zin)));
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.