diff --git a/python/bllipparser/ParsingShell.py b/python/bllipparser/ParsingShell.py index 1b12737..4fb46b3 100644 --- a/python/bllipparser/ParsingShell.py +++ b/python/bllipparser/ParsingShell.py @@ -15,10 +15,17 @@ import nltk.tree try: import nltk.draw.tree - have_tree_drawing = True + have_tree_drawing = False read_nltk_tree = nltk.tree.Tree.parse + have_tree_drawing = True except ImportError: have_tree_drawing = False +except AttributeError: + try: + read_nltk_tree = nltk.tree.Tree.fromstring + have_tree_drawing = True + except AttributeError: + have_tree_drawing = False from bllipparser.RerankingParser import RerankingParser