In most cases the script will work properly, but Dutch is a crazy language, and the rule is actually sound based not letter based:
http://www.onzetaal.nl/advies/kofschip.php
So in some cases the script will give the wrong result.
Don't know if there is a solution for that though (unless you are willing to include all the exceptions...)