Filtering is used to clean the text after generation, adding caps and removing extra punctuation. It is regexp based and will have as an input a string, previously generated by Pug.
The filtering mechanism is called automatically.
Filtering is nice because it will automatically manage capitalization etc. for you. But sometimes you want to disable this mechanim for some sections: Baba Inc. is a nice company instead of Baba Inc. Is a nice company.
protectString(string) js function to protect your strings from begin filtered:
will output protected.string (and not protected. String).
You should favor the
protect tag to protect structures:
will output the same.
¤ are special characters and must just not be used in your texts:
§is used to mark protected sections (
§…§marks a section) before filtering.
¤is a space automatically inserted by RosaeNLG. The filtering mechanism needs to distinguish which spaces are natural from the automatic ones, especially in the protected sections.