An optimised algorithm for data oriented parsing