(09-12-2024, 09:34 AM)oshfdk wrote: You are not allowed to view links. Register or Login to view.I still don't get it, unfortunately. Could you maybe show it to me step by step using this simple example: say, we have words CAT, BAT, MAT, COT, BOT, MOP. The trivial character grammar is [A|B|C|M|O|P|T]x3 (3 slots of 7 elements each). How to chunkify this grammar?
Sure.
Grammar: [A|B|C|M|O|P|T]x3 (trivial LL*CS)
Word 1: CAT.
We start with a 'null' chunk and we will add a character at a time as we find it in the grammar
Start from the first character of CAT: C
It matches the 'C' in slot 1, 3rd position, so the first character of the chunk is C
Next character: A
It matches the 'A' in slot 2, 1st position, so the chunk is now CA
Next character: T
It matches the 'T' in slot 3, 7th position, so the chunk is now CAT
End of word: CAT is 'chunkified' as CAT
Word 2: BAT
Exactly the same as above: it's chunkified as BAT
... etc. etc.: every word in the list is 'chunkified' as the word itself.
So the 'chunkified' grammar we end with is [CAT, BAT, MAT, COT, BOT, MOP]x1, the trivial 1*WS grammar. It has 6 chunks, one for each of the words in the list, which is the worst possible number of chunks one can get.
Let's try the same with the [CAT, BAT, MAT, COT, BOT, MOP]x1 (trivial 1*WS) grammar instead.
Word 1: CAT
It matches the 'CAT' in the 1st (and only) slot in the grammar, 1st position: chunkified as CAT
Word 2: BAT
It matches 'BAT' in the 1st slot of the grammar, 2nd position: chunkified as BAT
.. etc. etc., so we get back exactly the same grammar we started with, and we get again the worst possible score.
If the explanation is not enough, I'm here! Btw, that's exactly how my software, basically, works.

