Example #1
0
def get_noun_scene_heads(passage):
    fnodes = [
        x for x in passage.layer(layer1.LAYER_ID).all
        if x.tag == layer1.NodeTags.Foundational and x.is_scene()
    ]
    heads = [scenes.extract_head(x) for x in fnodes]
    noun_heads = [x for x in heads if x is not None and scenes.is_noun(x)]
    return noun_heads
Example #2
0
def get_noun_scene_heads(passage):
    fnodes = [x for x in passage.layer(layer1.LAYER_ID).all
              if x.tag == layer1.NodeTags.Foundational and x.is_scene()]
    heads = [scenes.extract_head(x) for x in fnodes]
    noun_heads = [x for x in heads if x is not None and scenes.is_noun(x)]
    return noun_heads
Example #3
0
def get_noun_heads(passage):
    fnodes = scenes.extract_non_scenes_AGCE(passage)
    heads = [scenes.extract_head(fnode) for fnode in fnodes]
    noun_heads = [head for head in heads
                  if head is not None and scenes.is_noun(head)]
    return noun_heads