-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DMRX creates <realpred> nodes without required pos field #129
Comments
Strict fix:
Robust fix:
|
Maybe the default pos should be 'u' unknown?
…On Wed, Dec 20, 2017 at 2:44 AM, Michael Wayne Goodman < ***@***.***> wrote:
Strict fix:
- throw error when Pred.stringpred() has no pos
- throw (more informative) error when Pred.realpred() has no pos
- (maybe unnecessary) throw error in dmrx._encode_node() if pos is None
- (maybe unnecessary) throw error in dmrx._decode_pred() if pos is None
Robust fix:
- create pos="" attribute in dmrx.encode_node() when pos is None
- create default pos (x? empty string?) in dmrx.decode_pred() when pos
is None
- refactor Pred class to allow, e.g., empty strings for pos
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABD8xuc2NXL0R7geiBZMvGvGXjdcQiCVks5tCHSRgaJpZM4RHzzw>
.
--
Francis Bond <http://www3.ntu.edu.sg/home/fcbond/>
Division of Linguistics and Multilingual Studies
Nanyang Technological University
|
Oh I thought But I want to avoid doing something quietly that would yield a different MRS on round-tripping. E.g., if PyDelphin reads in I would rather throw an error (grammar devs need to get with the times, man), make normalization (i.e. inserting the 'u' pos) an explicit operation by the user (e.g. |
The previous fix allowed PyDelphin to deal with missing POS values in Preds, but it still output DMRX that had no pos attribute on nodes, which was non-conformant with the DTD. This commit makes pos="" equivalent to a None value of pos for DMRX and MRX. MRX is still non-conformant in that it won't output <label> or <var> as TOP and INDEX when they are None on the Xmrs object, but there is not a good solution for that case. This commit also allows MRX to deal with missing TOP and INDEX on input. Addresses #129
Jacy has a predicate like
_te_adjunct_rel
, which PyDelphin converts to the following realpred:Then dmrx._decode_pred returns
None
forelem.get('pos')
, and Pred.realpred trips on the non-string value of the pos field.See: http://lists.delph-in.net/archives/developers/2017/002631.html
The text was updated successfully, but these errors were encountered: