link-grammar

How to translate syntatic parse to a dependency parse tree?

╄→гoц情女王★ 提交于 2019-12-25 04:26:51
问题 Using Link Grammar I can have the syntaxic parse of sentences something like the following: +-------------------Xp------------------+ +------->WV------->+------Ost------+ | +-----Wd----+ | +----Ds**x---+ | | +Ds**c+--Ss--+ +-PHc+---A---+ | | | | | | | | | LEFT-WALL a koala.n is.v a cute.a animal.n . +---------------------Xp--------------------+ +------->WV------>+---------Osm--------+ | +-----Wd----+ | +------Ds**x------+ | | +Ds**c+--Ss-+ +--PHc-+-----A----+ | | | | | | | | | LEFT-WALL a

How to find invalid Link Grammar tokens?

爱⌒轻易说出口 提交于 2019-12-13 02:25:42
问题 I'd like to use the Link Grammar Python3 bindings for a simple grammar checker. While the linkage API is relatively well-documented, there doesn't seem to be way to access all tokens that prevent linkages. This is what I have so far: #!/usr/bin/env python # -*- coding: utf-8 -*- from linkgrammar import Sentence, ParseOptions, Dictionary, __version__ print('Link Grammar Version:', __version__) for sentence in ['This is a valid sample sentence.', 'I Can Has Cheezburger?']: sent = Sentence