Automatically insert acronyms with Hz_Filter_Acronym
I hope this demo speaks for itself:
This class is only good for parsing. If you’d like to use it in your application, here are some tips using the variable names from the gist’s example:
- initialize the class once, so you won’t have to pass on
$wordson every initiation - cache the output, it’s an expensive round trip you do not want to do
- invalidate (delete) cache only when
$wordsget bigger or when$sentencechanges
Requirements:
- Zend Framework, or at least the
Zend_Filter_Interface-class on your include path. Even this single requirement is optional, just comment outimplements Zend_Filter_Interfaceif you want to use it as a standalone component.
You find Hz_Filter_Acronym at github