예제 #1
0
def the_mouse():
    dmrs = DictDmrs(surface='the mouse')
    dmrs.add_node(Node(nodeid=1, pred=RealPred('the', 'q'), cfrom=0, cto=3))
    dmrs.add_node(
        Node(nodeid=2,
             pred=RealPred('mouse', 'n', '1'),
             cfrom=4,
             cto=9,
             sortinfo=InstanceSortinfo(pers='3', num='sg', ind='+')))
    dmrs.add_link(Link(start=1, end=2, rargname='RSTR', post='H'))
    return dmrs
예제 #2
0
def dog_cat():
    dmrs = DictDmrs(surface='dog cat')
    dmrs.add_node(
        Node(pred=RealPred('dog', 'n', '1'),
             cfrom=0,
             cto=3,
             sortinfo=InstanceSortinfo(pers='3', num='sg', ind='+')))
    dmrs.add_node(
        Node(pred=RealPred('cat', 'n', '1'),
             cfrom=4,
             cto=7,
             sortinfo=InstanceSortinfo(pers='3', num='sg', ind='+')))
    return dmrs
예제 #3
0
def the():
    dmrs = DictDmrs()
    dmrs.add_node(Node(pred=RealPred('the', 'q')))  # node id set automatically
    return dmrs
예제 #4
0
def noun():
    dmrs = DictDmrs()
    dmrs.add_node(
        Node(pred=RealPred('?', 'n', 'unknown'),
             sortinfo=Sortinfo()))  # underspecified noun and sortinfo
    return dmrs
예제 #5
0
def predsort():
    dmrs = DictDmrs()
    dmrs.add_node(
        Node(pred=Pred(),
             sortinfo=Sortinfo()))  # underspecified predicate and sortinfo
    return dmrs