public class UnWrapper extends Object
| Constructor and Description |
|---|
UnWrapper(Lexicon lexicon)
Initialise an UnWrapper with a lexicon.
|
| Modifier and Type | Method and Description |
|---|---|
static NLGSpec |
getNLGSpec(Reader xmlReader)
Create wrapper objects from xml for a request to realise, or the xml for
a recording.
|
NLGElement |
UnwrapCoordinatePhraseSpec(XmlNLGElement wps)
Unwraps a coordinate phrase.
|
DocumentElement |
UnwrapDocumentElement(XmlDocumentElement wt)
Create simplenlg objects from wrapper objects.
|
NLGElement |
UnwrapNLGElement(XmlNLGElement wps)
Unwrap a
simplenlg.xmlrealiser.wrapper.NLGElement and map it
to a simplenlg.framework.NLGElement |
void |
UnwrapPhraseComponents(PhraseElement hp,
XmlNLGElement wps)
Unwrap the common phrase components (premodifiers, postmodifiers etc)
that any
simplenlg.xmlrealiser.wrapper.NLGElement can have,
and map it to a simplenlg.framework.NLGElement |
public UnWrapper(Lexicon lexicon)
lexicon - the lexicon to usepublic static NLGSpec getNLGSpec(Reader xmlReader) throws XMLRealiserException
xmlReader - the xml readerXMLRealiserException - the xML realiser exceptionpublic DocumentElement UnwrapDocumentElement(XmlDocumentElement wt)
wt - the wrapper DocumentElement objectpublic NLGElement UnwrapNLGElement(XmlNLGElement wps)
simplenlg.xmlrealiser.wrapper.NLGElement and map it
to a simplenlg.framework.NLGElementwps - The wrapper objectpublic void UnwrapPhraseComponents(PhraseElement hp, XmlNLGElement wps)
simplenlg.xmlrealiser.wrapper.NLGElement can have,
and map it to a simplenlg.framework.NLGElementhp - the simplenlg.framework.NLGElement which is
cuurrently being constructedwps - The wrapper objectpublic NLGElement UnwrapCoordinatePhraseSpec(XmlNLGElement wps)
wps - the simplenlg.xmlrealiser.wrapper.NLGElement
representing the phrasesimplenlg.framework.CoordinatedPhraseElement or
null if the wrapper element is not a coordinate
phrase.Copyright © 2020. All Rights Reserved.