hatemfaheem / ai-story-generator

Generate stories using AI
2 stars 1 forks source link

Improve text justification algorithm #12

Closed hatemfaheem closed 1 year ago

hatemfaheem commented 1 year ago

Text justification is currently done by breaking down the text into lines of fixed number of words i.e. 4 words per line. If the word lengths vary in the same text the lines will look terribly unaligned. Improve this by using a smarter text justification algorithm.

hatemfaheem commented 1 year ago

https://pypi.org/project/JustifyText/

hatemfaheem commented 1 year ago

https://github.com/hatemfaheem/ai-story-generator/commit/a7a6f7c59f8d37f68791f4041037d393e672232b