English hyphenation algorithm in PHP(10th July 2013) |
|||||||
A good presentation about hyphenation in HTML documents can be seen here, but it is client side (JavaScript) oriented. Basically you shouldn't use justified text unless it is hyphenated, because long words will cause huge spaces between words to make the line stretch out the whole width of the element. I found a few PHP scripts such as phpHyphenator 1.5, but typically they weren't implemented as a single stand-alone PHP class. Since the underlying algorithm is fairly simple, I decided to write it from scratch.
|
![]() |
Home
|
Home | (Home page) |
About | (About me) |
Platform | (About this blog) |
(Niko Nyrhilä) | |
GitHub | (nikonyrh) |
Stackoverflow | (nikonyrh) |
Introduction to Stable Diffu... | (2022 Nov) |
Matching puzzle pieces together | (2022 Jul) |
Single channel speech / musi... | (2022 Feb) |
Image and video clustering w... | (2022 Jan) |
Helsinki Deblur Challenge 2021 | (2021 Dec) |
Computer Vision | (12) |
GitHub | (12) |
Databases | (9) |
Elasticsearch | (6) |
FFT | (5) |
Rendering | (5) |
Data Structures | (4) |
Python | (11) |
C++ | (11) |
Matlab | (10) |
Clojure | (6) |
Bash | (6) |
PHP | (6) |
Keras | (5) |
Matl | Pyth | C++ | Cloj | Bash | PHP | |
Comput | 6 | 5 | 3 | 1 | 0 | 0 |
GitHub | 0 | 2 | 1 | 4 | 3 | 3 |
Databa | 0 | 3 | 2 | 2 | 1 | 1 |
Render | 3 | 0 | 3 | 0 | 0 | 0 |
Nginx | 0 | 1 | 0 | 0 | 4 | 0 |
Elasti | 0 | 2 | 0 | 3 | 0 | 1 |
FFT | 3 | 1 | 1 | 0 | 0 | 0 |
Data S | 2 | 1 | 2 | 1 | 0 | 1 |
JVM | 0 | 1 | 0 | 3 | 1 | 0 |
Autoen | 0 | 3 | 0 | 1 | 0 | 0 |
Docker | 0 | 1 | 0 | 0 | 3 | 0 |
FastCG | 0 | 0 | 3 | 0 | 0 | 0 |
Blog | 0 | 0 | 0 | 2 | 0 | 2 |
Hyphen | 0 | 0 | 0 | 2 | 0 | 2 |
Omnidi | 2 | 0 | 2 | 0 | 0 | 0 |
Field | 2 | 0 | 2 | 0 | 0 | 0 |
Affine | 2 | 0 | 2 | 0 | 0 | 0 |
Applie | 2 | 1 | 0 | 0 | 0 | 0 |
Archit | 0 | 1 | 0 | 0 | 2 | 0 |
Master | 1 | 0 | 2 | 0 | 0 | 0 |
Spark | 0 | 1 | 0 | 0 | 2 | 0 |
Visual | 1 | 0 | 2 | 0 | 0 | 0 |
Regula | 0 | 0 | 0 | 0 | 0 | 2 |
Stack | 0 | 1 | 1 | 0 | 0 | 0 |
Encryp | 0 | 0 | 0 | 0 | 1 | 1 |
SQL | 0 | 0 | 1 | 1 | 0 | 0 |
Busine | 0 | 1 | 0 | 1 | 0 | 0 |
Git | 0 | 0 | 0 | 1 | 0 | 1 |
Stable | 0 | 1 | 0 | 0 | 0 | 0 |
Signal | 0 | 1 | 0 | 0 | 0 | 0 |
Redis | 0 | 1 | 0 | 0 | 0 | 0 |
Kibana | 0 | 0 | 0 | 1 | 0 | 0 |
Thrust | 0 | 0 | 1 | 0 | 0 | 0 |
Astron | 1 | 0 | 0 | 0 | 0 | 0 |
NAT | 0 | 0 | 0 | 0 | 1 | 0 |
Mustac | 0 | 0 | 1 | 0 | 0 | 0 |
SSH | 0 | 0 | 0 | 0 | 1 | 0 |
jQuery | 0 | 0 | 1 | 0 | 0 | 0 |
Backup | 0 | 0 | 0 | 0 | 1 | 0 |
Happyh | 0 | 0 | 1 | 0 | 0 | 0 |
AWS | 0 | 0 | 0 | 0 | 1 | 0 |
Pthrea | 0 | 0 | 1 | 0 | 0 | 0 |
SIFT | 0 | 0 | 1 | 0 | 0 | 0 |
SURF | 0 | 0 | 1 | 0 | 0 | 0 |
Conjug | 0 | 0 | 1 | 0 | 0 | 0 |
Kalman | 0 | 0 | 1 | 0 | 0 | 0 |
Partic | 0 | 0 | 1 | 0 | 0 | 0 |
Gradie | 0 | 0 | 1 | 0 | 0 | 0 |
Simult | 0 | 0 | 1 | 0 | 0 | 0 |
Roboti | 0 | 0 | 1 | 0 | 0 | 0 |
Princi | 1 | 0 | 0 | 0 | 0 | 0 |
Receiv | 1 | 0 | 0 | 0 | 0 | 0 |
Linear | 1 | 0 | 0 | 0 | 0 | 0 |
Suppor | 1 | 0 | 0 | 0 | 0 | 0 |
Machin | 1 | 0 | 0 | 0 | 0 | 0 |
Discre | 1 | 0 | 0 | 0 | 0 | 0 |