public class OrthographyProcessor extends NLGModule
This processing module deals with punctuation when applied to
DocumentElements. The punctuation currently handled by this
processor includes the following (as of version 4.0):
| Constructor and Description |
|---|
OrthographyProcessor() |
| 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 a matrix phrase
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.
|
void |
setCommaSepCuephrase(boolean commaSepCuephrase)
If set to
true, separates a cue phrase from the matrix
phrase using a comma. |
void |
setCommaSepPremodifiers(boolean commaSepPremodifiers)
Set whether to separate premodifiers using a comma.
|
getLexicon, setLexiconpublic void initialise()
NLGModuleinitialise in class NLGModulepublic boolean isCommaSepPremodifiers()
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.commaSepPremodifiers - the commaSepPremodifiers to setpublic boolean isCommaSepCuephrase()
true if this parameter is set.public void setCommaSepCuephrase(boolean commaSepCuephrase)
true, separates a cue phrase from the matrix
phrase using a comma. Cue phrases are typically at the start of a
sentence (e.g. However, John left early). This will only
apply to phrases with the feature
DiscourseFunction.CUE_PHRASE or DiscourseFunction.FRONT_MODIFIER.commaSepCuephrase - whether to separate cue phrases using a commapublic 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.