save a dependecy graph in python
问题 I am using in python3 the stanford dependency parser to parse a sentence, which returns a dependency graph. import pickle from nltk.parse.stanford import StanfordDependencyParser parser = StanfordDependencyParser('stanford-parser-full-2015-12-09/stanford-parser.jar', 'stanford-parser-full-2015-12-09/stanford-parser-3.6.0-models.jar') sentences = ["I am going there","I am asking a question"] with open("save.p","wb") as f: pickle.dump(parser.raw_parse_sents(sentences),f) It gives an error :