Skip to content

Sentence Generation Superfluous Whitespace #217

Closed Answered by mike-lischke
MadcapJake asked this question in Q&A
Discussion options

You must be logged in to vote

Whitespaces are usually not quantitative elements, but more of fill elements, and appear in any cluster size. The sentence generation, however, generates on a single space (not tab, no linebreak etc.) between every generated element. Because of the recursive and iterative nature of parser grammars, elements might not have been created actually, but their surrounding spaces, which creates a sequence of them.

In any case, these (extra) spaces have no impact on the parsability of the generated text. It's still valid input for the given grammar. I recommend adding a post processing job to get rid of elements you don't want.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mike-lischke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants