public class SynFun extends Object
| Constructor and Description |
|---|
SynFun() |
| Modifier and Type | Method and Description |
|---|---|
static HashMap<Annotation,Annotation> |
collectParents(Annotation root)
returns a map from each child node to its parent in the parse tree
rooted at
root. |
static String |
getDet(Annotation constit)
returns the determiner of 'constit', or null if the
consitutent has no determiner.
|
static String |
getHead(Document doc,
Annotation ann)
returns the head string of constituent 'ann' in a parse tree.
|
static boolean |
getHuman(Annotation constit)
returns true if noun phrase 'constit' has a human head,
as recorded either an a 'human' feature on PA (by the
chunk patterns) or an 'nhuman' feature in the dictionary.
|
static String |
getImmediateHead(Annotation node)
returns the head string for the current node.
|
static String |
getName(Document doc,
Annotation constit)
returns the name associated with a noun phrase, as a single
string, or null if the np does not have a name.
|
static String |
getNameOrHead(Document doc,
Annotation ann)
if the head (the end of the 'headC' chain) of constituent 'ann'
is a name, return the name itself (with tokens connected by '-');
otherwise return the head as determined by 'getHead'.
|
static String |
getNumber(Annotation constit)
returns the number feature of noun phrase 'constit'
(singular or plural), or 'null' if the number feature is
not specified.
|
static Object |
getPA(Annotation constit)
returns the 'pa' feature directly or indirectly associated with
parse tree node 'constit'.
|
static String |
headOfPa(Object pa,
Annotation ann)
returns the head string from the value of the 'pa' feature.
|
public static String getImmediateHead(Annotation node)
public static String headOfPa(Object pa, Annotation ann)
pa - value of pa featureann - annotation of which this is the pa feature; used only
for error messagespublic static Object getPA(Annotation constit)
public static String getHead(Document doc, Annotation ann)
public static String getName(Document doc, Annotation constit)
public static String getNameOrHead(Document doc, Annotation ann)
public static String getDet(Annotation constit)
public static String getNumber(Annotation constit)
public static boolean getHuman(Annotation constit)
public static HashMap<Annotation,Annotation> collectParents(Annotation root)
root.Copyright © 2016 New York University. All rights reserved.