Examples of nTokenNode()


Examples of org.maltparserx.core.syntaxgraph.PhraseStructure.nTokenNode()

            // n -> nt, nonterminals, name
            if (reader.getLocalName().equals("nt")) {
              ntid.setLength(0);
            }
            else if (reader.getLocalName().equals("nonterminals")) {
              if (phraseStructure.nTokenNode() == 1 && phraseStructure.nNonTerminals() == 0 &&((NonTerminalNode)phraseStructure.getPhraseStructureRoot()).nChildren() == 0) {
                Edge e = phraseStructure.addPhraseStructureEdge(phraseStructure.getPhraseStructureRoot(), phraseStructure.getTokenNode(1));
                SortedMap<String, SymbolTable> inputTables = dataFormatInstance.getPhraseStructureEdgeLabelSymbolTables();
                for (String name : inputTables.keySet()) {
                  e.addLabel(inputTables.get(name), "--");
                }
View Full Code Here

Examples of org.maltparserx.core.syntaxgraph.PhraseStructure.nTokenNode()

        writer.write("discontinuous=\"");
        writer.write(Boolean.toString(!phraseStructure.isContinuous()));
        writer.write("\">\n");
       
        writeTerminals(phraseStructure);
        if (phraseStructure.nTokenNode() != 1 || rootHandling.equals(RootHandling.TALBANKEN)) {
          writeNonTerminals(phraseStructure);
        } else {
          writer.write("        <nonterminals/>\n");
        }
        writer.write("      </graph>\n");
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.