public class SyntaxProcessor extends NLGModule
This is the processor for handling syntax within the SimpleNLG. The processor translates phrases into lists of words.
All processing modules perform realisation on a tree of
NLGElements. The modules can alter the tree in whichever way
they wish. For example, the syntax processor replaces phrase elements with
list elements consisting of inflected words while the morphology processor
replaces inflected words with string elements.
N.B. the use of module, processing module and processor is interchangeable. They all mean an instance of this class.
| Constructor and Description |
|---|
SyntaxProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialise()
Performs one-time initialisation of the module.
|
List<NLGElement> |
realise(List<NLGElement> elements)
Realises a
List of NLGElements usually by
iteratively calling the realise(NLGElement) method on each
element in the list and adding the result into a new a List |
NLGElement |
realise(NLGElement element)
Realises the given element.
|
getLexicon, setLexiconpublic void initialise()
NLGModuleinitialise in class NLGModulepublic NLGElement realise(NLGElement element)
NLGModulepublic List<NLGElement> realise(List<NLGElement> elements)
NLGModuleList of NLGElements usually by
iteratively calling the realise(NLGElement) method on each
element in the list and adding the result into a new a ListCopyright © 2020. All Rights Reserved.