Added length dependent pruning
Bug fix: corner case when rule is just start of sentence