public class Realiser extends NLGModule
| Constructor and Description |
|---|
Realiser()
create a realiser (no lexicon)
|
Realiser(Lexicon lexicon)
Create a realiser with a lexicon (should match lexicon used for
NLGFactory)
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialise()
Performs one-time initialisation of the module.
|
boolean |
isCommaSepCuephrase()
Check whether this processor separates cue phrases from the matrix clause using a comma.
|
boolean |
isCommaSepPremodifiers()
Check whether this processor separates premodifiers using a comma.
|
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.
|
String |
realiseSentence(NLGElement element)
Convenience class to realise any NLGElement as a sentence
|
void |
setCommaSepCuephrase(boolean commaSepCuephrase)
Set whether to separate cue phrases from the host phrase using a comma.
|
void |
setCommaSepPremodifiers(boolean commaSepPremodifiers)
Set whether to separate premodifiers using a comma.
|
void |
setDebugMode(boolean debugOn) |
void |
setFormatter(NLGModule formatter) |
void |
setLexicon(Lexicon newLexicon)
Sets the lexicon to be used by this module.
|
getLexiconpublic Realiser()
public Realiser(Lexicon lexicon)
public boolean isCommaSepPremodifiers()
Implementation note: this method checks whether the
OrthographyProcessor has the
parameter set.
true if premodifiers in the noun phrase are
comma-separated.public void setCommaSepPremodifiers(boolean commaSepPremodifiers)
true,
premodifiers will be comma-separated, as in the long, dark road.
If false, they won't. OrthographyProcessor.commaSepPremodifiers - the commaSepPremodifiers to setpublic boolean isCommaSepCuephrase()
Implementation note: this method checks whether the
OrthographyProcessor has the
parameter set.
true if cue phrases have a comma before the remainder of the host phrasepublic void setCommaSepCuephrase(boolean commaSepCuephrase)
true,
a comma will be inserted, as in however, Bill arrived late.
If false, they won't. OrthographyProcessor.public void initialise()
NLGModuleinitialise in class NLGModulepublic NLGElement realise(NLGElement element)
NLGModulepublic String realiseSentence(NLGElement element)
public 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 Listpublic void setLexicon(Lexicon newLexicon)
NLGModulenull
will remove the existing lexicon and no lexicon will be used.setLexicon in class NLGModulenewLexicon - the new Lexicon to be used.public void setFormatter(NLGModule formatter)
public void setDebugMode(boolean debugOn)
Copyright © 2020. All Rights Reserved.