Such complex cases cannot be covered by a simple heuristic, but rather need to be defined via language dependent rules in order to be captured properly across languages.
as mentioned before, this requires linguistic knowledge of the language in question.