If the only thing you changed was 'StanfordDependencyParser' and the error states: module' object has no attribute 'StanfordDependencyParser' I would assume that StanfordDependencyParser was the wrong thing to change it to. Have you copied all of the code that you linked to verbatim?