yzhangcs / parser

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

an error caused by brackets #59

Closed LTEnjoy closed 3 years ago

LTEnjoy commented 3 years ago

Hi, I ran into an error when ran the code: words = ['(', 'There', 'is', 'no', 'doubt', ')'] and I got the error as follow: IndexError: list index out of range What is mystrious is that when I deleted the brackets '(' and ')', it worked. Could you tell me how can I rewrite the code to make it work even with brackets?

yzhangcs commented 3 years ago

@LTEnjoy It's a bug of NLTK. A way is to replace the brackets with other symbols like '['/']'.