Package opennlp.ccg.alignment

Examples of opennlp.ccg.alignment.Mapping


        Element al = (Element)als.item(j);
        if(al.getAttribute("source").equals("ANNOTATOR")) {
          NodeList as = al.getElementsByTagName("alignment");
          for(int k = 0; k < as.getLength(); k++) {
            Element a = (Element)as.item(k);
            ms.add(new Mapping(id, Integer.parseInt(a.getAttribute("first")),
                Integer.parseInt(a.getAttribute("second")),
                    Status.forAbbreviation(a.getAttribute("status"))));
          }
        }
      }
View Full Code Here


   
    alignment = new Alignment(new Phrase(337, "A", "boy", "walks", "quickly"),
        new Phrase(337, "He", "moves"),
        Collections.EMPTY_SET);
   
    alignment.add(new Mapping(0, 0));
    alignment.add(new Mapping(1, 0));
    alignment.add(new Mapping(2, 1));
   
    aGraph = new LFGraph();
   
    LFVertex aw0 = new LFVertex(new NominalAtom("w0"), new Proposition("a")),
      aw1 = new LFVertex(new NominalAtom("w1"), new Proposition("boy")),
View Full Code Here

TOP

Related Classes of opennlp.ccg.alignment.Mapping

Copyright © 2018 www.massapicom. 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.