Slavic languages ββare highly flexive . The most accurate and fast approach would be a combination of rules and large mappings / dictionaries.
The work is done, but it is being held back. Croatian morphological vocabulary will help, but this is behind a slow API. More work can be found between Bosnian, Serbian and Croatian, not just Croatian.
Larger mappings are not always convenient (and you can effectively build a better rule transformer from mappings / dictionaries / cases).
Implementing using Hunspell and affix files can be a great way to get community and java support. For instance. Google search: hr_hr.aff
Not tested: you need to be able to cancel all words, build three end characters, go through some rules (for example, LCS) and build an accurate statistical transformer using the body text.
Best I can do python:
import hunspell hs = hunspell.HunSpell( '/usr/share/myspell/hr_HR.dic', '/usr/share/myspell/hr_HR.aff')
12345 source share