yzhangcs / parser

:rocket: State-of-the-art parsers for natural language.
https://parser.yzhang.site/
MIT License
827 stars 139 forks source link

Issue with pretty_print in Constituency parser #70

Closed emadg closed 3 years ago

emadg commented 3 years ago

Hi,

I tried your demo on your github to create constituency parser but could not get the pretty_print tree structure.

sent = "This is my sentence to be parsed with SuPar !"

parse = con.predict(sent.split(), verbose=False)

print(parse[0])

parse[0].pretty_print()

got this error:

AttributeError in python

Here is a Google colab to try and reproduce the problem: (check Issue # 1) https://colab.research.google.com/drive/1CDZRPab8P4ba7amPxy5jhY6mBrdJ54B4?usp=sharing

yzhangcs commented 3 years ago

@emadg Hi, pretty_print has not been included in the new release.

emadg commented 3 years ago

@yzhangcs thanks for your response, will the function be added again or is it removed from the library for some reason?

yzhangcs commented 3 years ago

@emadg It has been added in v1.1.1

emadg commented 3 years ago

@yzhangcs Yes I confirmed that, thanks!