Package opennlp.ccg.hylo

Examples of opennlp.ccg.hylo.Proposition


    catch(UnsupportedOperationException expected) {
      // do nothing
    }
   
    try {
      m.put(new ModeLabel("foo"), new Proposition("bar"));
      fail("able to put into attribute map");
    }
    catch(UnsupportedOperationException expected) {
      // do nothing
    }
View Full Code Here


    testLF = Realizer.getLfFromElt(new DOMBuilder().build(db.parse(testFile).getDocumentElement()));
   
    graph = LFGraphFactory.newGraphFrom(testLF);
   
    expected = new LFGraph(LFGraphFactory.DEFAULT_EDGE_FACTORY);
    LFVertex w7 = new LFVertex(new NominalAtom("w7"), new Proposition("be"));
    w7.setAttribute(new ModeLabel("mood"), new Proposition("dcl"));
    w7.setAttribute(new ModeLabel("tense"), new Proposition("past"));
    expected.addVertex(w7);
   
    LFVertex w0 = new LFVertex(new NominalAtom("w0"), new Proposition("bank"));
    w0.setAttribute(new ModeLabel("det"), new Proposition("nil"));
    expected.addVertex(w0);
   
    LFVertex w1 = new LFVertex(new NominalAtom("w1"), new Proposition("of"));
    expected.addVertex(w1);
   
    LFVertex w2 = new LFVertex(new NominalAtom("w2"), new Proposition("holland"));
    w2.setAttribute(new ModeLabel("det"), new Proposition("nil"));
    w2.setAttribute(new ModeLabel("num"), new Proposition("sg"));
    expected.addVertex(w2);
   
    LFVertex w5 = new LFVertex(new NominalAtom("w5"), new Proposition("office"));
    w5.setAttribute(new ModeLabel("det"), new Proposition("nil"));
    w5.setAttribute(new ModeLabel("num"), new Proposition("sg"));
    expected.addVertex(w5);
   
    LFVertex w4 = new LFVertex(new NominalAtom("w4"), new Proposition("wuhan"));
    w4.setAttribute(new ModeLabel("num"), new Proposition("sg"));
    expected.addVertex(w4);
   
    LFVertex w9 = new LFVertex(new NominalAtom("w9"), new Proposition("officially"));
    expected.addVertex(w9);
   
    LFVertex w8 = new LFVertex(new NominalAtom("w8"), new Proposition("also"));
    expected.addVertex(w8);
   
    LFVertex w10 = new LFVertex(new NominalAtom("w10"), new Proposition("establish"));
    w10.setAttribute(new ModeLabel("tense"), new Proposition("past"));
    expected.addVertex(w10);
   
    LFVertex w11 = new LFVertex(new NominalAtom("w11"), new Proposition("just"));
    expected.addVertex(w11);
   
    LFVertex w12 = new LFVertex(new NominalAtom("w12"), new Proposition("recently"));
    expected.addVertex(w12);
   
    expected.addLabeledEdge(w7, w0, LFEdgeLabel.forMode(new ModeLabel("Arg0")));
    expected.addLabeledEdge(w0, w1, LFEdgeLabel.forMode(new ModeLabel("Mod")));
    expected.addLabeledEdge(w1, w2, LFEdgeLabel.forMode(new ModeLabel("Arg1")));
View Full Code Here

 
  @Before
  public void setUp() throws Exception {
    super.setUp();
   
    source = new LFVertex(new NominalAtom("w3"), new Proposition("prop1"));
    target = new LFVertex(new NominalAtom("w9"), new Proposition("prop2"));
    label = new LFEdgeLabel(new ModeLabel("Arg0"));
   
    edge = new LFEdge(source, target, label);
  }
View Full Code Here

   * Gets this LF vertex's associated predicate, the name of its {@linkplain #getProposition() proposition}.
   * @return The value of <tt>getProposition().getName()</tt>, if this vertex's proposition is non-null,
   * and <tt>null</tt> otherwise.
   */
  public String getPredicate() {
    Proposition p = getProposition();
    return (p == null) ? null : p.getName();
  }
View Full Code Here

TOP

Related Classes of opennlp.ccg.hylo.Proposition

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.