Examples of toCompactString()


Examples of edu.stanford.nlp.semgraph.SemanticGraph.toCompactString()

        for (int i=1; i<args.length;i++) {
          String text = args[i];
          SemanticGraph sg = SemanticGraph.valueOf(text);
          Collection<SemanticGraph> generated = Ssurgeon.inst().exhaustFromPatterns(patterns, sg);
          System.out.println("\n= = = = = = = = = =\nSrc text = "+text);
          System.out.println(sg.toCompactString());
          System.out.println("# generated  = "+generated.size());
          for (SemanticGraph genSg : generated) {
            System.out.println(genSg);
            System.out.println(". . . . .");
          }
View Full Code Here

Examples of edu.stanford.nlp.semgraph.SemanticGraph.toCompactString()

        patElt.appendChild(notesElem);
       
        SemanticGraph semgrexGraph = pattern.getSemgrexGraph();
        if (semgrexGraph != null) {
          Element patNode = domDoc.createElement(SsurgeonPattern.SEMGREX_GRAPH_ELEM_TAG);
          patNode.appendChild(domDoc.createTextNode(semgrexGraph.toCompactString()));
        }
        Element editList = domDoc.createElement(SsurgeonPattern.EDIT_LIST_ELEM_TAG);
        patElt.appendChild(editList);
        int editOrdinal = 1;
        for (SsurgeonEdit edit : pattern.getEditScript()) {
View Full Code Here

Examples of edu.stanford.nlp.semgraph.SemanticGraph.toCompactString()

  public void simpleTest() throws Exception {
    SemanticGraph sg = SemanticGraph.valueOf("[mixed/VBN nsubj:[Joe/NNP appos:[bartender/NN det:the/DT]]  dobj:[drink/NN det:a/DT]]");
    SemgrexPattern semgrexPattern = SemgrexPattern.compile("{}=a1 >appos=e1 {}=a2 <nsubj=e2 {}=a3");
    SsurgeonPattern pattern = new SsurgeonPattern(semgrexPattern);

    System.out.println("Start = "+sg.toCompactString());

    // Find and snip the appos and root to nsubj links
    SsurgeonEdit apposSnip = new RemoveNamedEdge("e1", "a1", "a2");
    pattern.addEdit(apposSnip);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.Location.toCompactString()

        // and if so, model them.

        Set<SourceSinkInfo> sourceSinkSet = sourceSinkMap.get(location);
        if (sourceSinkSet != null) {
            if (DEBUG_VERBOSE) {
                System.out.println("Modeling source/sink at " + location.toCompactString() + ": " + sourceSinkSet.toString());
            }
            for (SourceSinkInfo sourceSinkInfo : sourceSinkSet) {
                fact.modelSourceSink(sourceSinkInfo);
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.Location.toCompactString()

            if (!forwardsFact.isValid() || !backwardsFact.isValid()) {
                continue;
            }

            if (DEBUG) {
                checkLocation = "location " + loc.toCompactString();
            }
            checkForConflictingValues(xmethod, cfg, typeQualifierValue, forwardsFact, backwardsFact, loc,
                    loc, vnaDataflow.getFactAtLocation(loc));
            checkForEqualityTest(xmethod, cfg, typeQualifierValue, forwardsFact, loc, vnaDataflow.getFactAtLocation(loc));
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.Location.toCompactString()

                if (!(backwardsFlowValue == FlowValue.ALWAYS || backwardsFlowValue == FlowValue.NEVER)) {
                    continue;
                }
                if (DEBUG) {
                    System.out.println("Checking value source at " + location.toCompactString() + " for " + typeQualifierValue);
                    System.out.println("  back=" + backwardsFact);
                    System.out.println("  source=" + source);
                }

                // Check to see if this warning has already been reported
View Full Code Here

Examples of org.apache.tapestry5.json.JSONObject.toCompactString()

        JSONObject reply = new JSONObject();

        linker.commit(reply);

        assertEquals(reply.toCompactString(), "{\"scripts\":[\"foo.js\",\"bar.js\"]}");

    }

    @Test
    public void stylesheet_link()
View Full Code Here

Examples of org.apache.tapestry5.json.JSONObject.toCompactString()

                OutputStream os = response.getOutputStream("application/json;charset=UTF-8");

                JSONObject reply = new JSONObject();
                reply.in(InternalConstants.PARTIAL_KEY).put("redirectURL", link.toAbsoluteURI());

                os.write(reply.toCompactString().getBytes("UTF-8"));

                os.close();

                return;
            }
View Full Code Here

Examples of org.apache.tapestry5.json.JSONObject.toCompactString()

        JSONObject reply = new JSONObject();

        linker.commit(reply);

        assertEquals(reply.toCompactString(), "{\"scripts\":[\"foo.js\",\"bar.js\"]}");

    }

    @Test
    public void stylesheet_link()
View Full Code Here

Examples of org.apache.tapestry5.json.JSONObject.toCompactString()

                OutputStream os = response.getOutputStream("application/json;charset=UTF-8");

                JSONObject reply = new JSONObject();
                reply.in(InternalConstants.PARTIAL_KEY).put("redirectURL", link.toAbsoluteURI());

                os.write(reply.toCompactString().getBytes("UTF-8"));

                os.close();

                return;
            }
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.