Skip to content
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

Mac Parsing on Ace #95

Closed
davidainman opened this issue Jan 24, 2017 · 2 comments
Closed

Mac Parsing on Ace #95

davidainman opened this issue Jan 24, 2017 · 2 comments
Milestone

Comments

@davidainman
Copy link

Described here: https://github.com/delph-in/pydelphin/wiki/Troubleshooting

@goodmami
Copy link
Member

Copying here in case the wiki content goes away:


If you are parsing on a Mac using Ace 0.9.24 and PyDelphin 0.6.0, you may encounter an error on parsing:

> ace.parse('/Users/David/Documents/School/DELPH-IN/erg/erg-1214-osx-0.9.24.dat', 'The man jumped.')

The error of the following type

> delphin.lib.pegre.PegreChoiceError: At position 0: 
>   At position 0: 
>   At position 0: Expected to match: -?(0|[1-9]\d*)(\.\d+[eE][-+]?|\.|[eE][-+]?)\d+
>   At position 0: Expected to match: -?\d+
>   At position 0: 
>   At position 0: Expected to match: "[^"\\]*(?:\\.[^"\\]*)*"
>   At position 0: Expected to match: (?:[^"\s\(\)\[\]\{\}\\;]+|\\.)+
>   At position 12: Expected to match: \)\s*

may be solved by adding to the parse command tsdbinfo=False, e.g.

> ace.parse('/Users/David/Documents/School/DELPH-IN/erg/erg-1214-osx-0.9.24.dat', 'The man jumped.', tsdbinfo=False)

The presumed source of the error (under investigation) is interleaving the stdout and stderr of the Ace parser.

@goodmami
Copy link
Member

Just confirming that I do not see this on Linux with the same versions of ACE, PyDelphin, or the ERG:

>>> res = ace.parse('/home/goodmami/grammars/erg-1214-x86-64-0.9.24.dat', 'The man jumped.')
>>> len(res.results())
2

@goodmami goodmami modified the milestone: v0.6.1 Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants