Skip to content

Julia-gro A4#59

Open
julia-gro wants to merge 8 commits into
mainfrom
julia-gro-A4
Open

Julia-gro A4#59
julia-gro wants to merge 8 commits into
mainfrom
julia-gro-A4

Conversation

@julia-gro

Copy link
Copy Markdown
Collaborator

ready for review :)

@AnesIms

AnesIms commented May 7, 2026

Copy link
Copy Markdown
Collaborator

The code works in my tests and the output matches the assignment requirements. It supports character-based and word-based generation, reads from a file or stdin, and the seed option makes the output reproducible.

I like that your implementation is very compact and easy to follow. I also really liked the algorithm section in your README, because it summarizes the main steps in words and makes it easy to follow what happens when reading through the code.

One edge case to consider is the fixed limit of 2000 generated units. I understand that this prevents infinite loops, which is useful. However, the meaning of 2000 units is quite different in character mode and word mode. in character mode it means about 2000 characters, while in word mode it can mean up to 2000 words. For very short cyclic inputs, this could also create a very long output from a very small training text. Maybe it would be worth considering whether the limit should depend on the input length or the selected mode.

Overall, this is a clean and well-working solution. (Y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants