Tree reader

from lambeq import BobcatParser, TreeReader, TreeReaderMode
sentence = 'John walks in the park.'
reader = TreeReader(ccg_parser=BobcatParser, mode = TreeReaderMode.NO_TYPE)
reader.sentence2diagram(sentence=sentence).draw()
../_images/a2efddfed09d3d52ff7219613fdab7346fb1d68dbe46be8df2940514f61a8014.png
reader = TreeReader(ccg_parser=BobcatParser, mode=TreeReaderMode.RULE_ONLY)
reader.sentence2diagram(sentence).draw()
../_images/532b0dbe0780d8bc2a01c7f8dcc1b9e756484e94fb6ed17a52285fd9c32b3e5b.png
reader = TreeReader(ccg_parser=BobcatParser, mode=TreeReaderMode.RULE_TYPE)
reader.sentence2diagram(sentence).draw()
../_images/61d7dddb2bb94f25cb783eb1c781d34151ef30dc5c1080d2b347d650ea3b70b7.png