Examples of DepFtrXml


Examples of clear.ftr.xml.DepFtrXml

  public static AbstractDepParser createParser(InputStream inputStream, String algorithmName)
      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);
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.