edu.columbia.surge.hashImpl
Class NPH
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--edu.columbia.surge.hashImpl.FDH
|
+--edu.columbia.surge.hashImpl.NPH
- Direct Known Subclasses:
- PPH
- public class NPH
- extends FDH
- implements NP
The NP category for a FD. Methods are provided to set the head and
the lex of the noun phrase. Users should only set either the head
or the lexical entry for each noun phrase, it does not make sense
to set both of them at the same time. This class implements the NP
interface and is implemented in the form of a HashMap as it is
inherrited from the FDH class. This class consists of methods and
constructors to set the required components of a NP. User can
either use the NPFactoryH class or directly use the constructor of
this class to create instances of NPH.
- See Also:
NPFactoryH
, Serialized Form
Constructor Summary |
NPH()
Constructor. |
NPH(FD head)
Constructor. |
NPH(java.lang.String lex)
Constructor. |
Method Summary |
void |
setHead(FD head)
A method to set the head of the NP |
void |
setLex(java.lang.String lex)
A method to set the lexical of the NP |
Methods inherited from class edu.columbia.surge.hashImpl.FDH |
checkPath,
checkPath,
computePathDifference,
getPath,
getPath,
putPath,
putPath,
putPathOverride,
putPathOverride,
stackToPath,
stringToArray,
toString,
toString,
toXML |
Methods inherited from class java.util.HashMap |
clear,
clone,
containsKey,
containsValue,
entrySet,
get,
isEmpty,
keySet,
put,
putAll,
remove,
size,
values |
Methods inherited from class java.util.AbstractMap |
equals,
hashCode |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
NPH
public NPH()
- Constructor. It creates a default instance of NPH.
NPH
public NPH(java.lang.String lex)
throws InvalidConstructorException
- Constructor. It creates an instance of NPH with the given
lexical entry.
- Parameters:
lex
- the lexical entry of the np.
NPH
public NPH(FD head)
throws InvalidConstructorException
- Constructor. It creates an instance of NPH with the given head.
- Parameters:
head
- the head entry of the np.
setLex
public void setLex(java.lang.String lex)
- A method to set the lexical of the NP
- Specified by:
- setLex in interface NP
- Parameters:
lex
-
setHead
public void setHead(FD head)
- A method to set the head of the NP
- Specified by:
- setHead in interface NP
- Parameters:
head
- a FD representation of the head