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

REPP character positions don't consider empty replacements #252

Closed
goodmami opened this issue Nov 25, 2019 · 0 comments
Closed

REPP character positions don't consider empty replacements #252

goodmami opened this issue Nov 25, 2019 · 0 comments

Comments

@goodmami
Copy link
Member

PyDelphin gives the same output as the standalone REPP tool for most inputs but it still has a bug or two. See the following output of PyDelphin:

$ delphin repp -c ~/grammars/erg-trunk/pet/repp.set --format triple <<< "Abrams <s>won't</s> go."
(0, 6, Abrams)
(7, 9, wo)
(9, 12, n’t)
(13, 15, go)
(15, 16, .)

Compared to REPP:

$ ~/logon/bin/repp -c ~/grammars/erg-trunk/pet/repp.set --format triple <<< "Abrams <s>won't</s> go."
(0, 6, Abrams)
(10, 12, wo)
(12, 15, n’t)
(20, 22, go)
(22, 23, .)

ACE gets it right (note, the sed commands are a useful way to convert ACE's output to match REPP's):

$ ace -g erg.dat -Ev <<< "Abrams <s>won't</s> go." 2>/dev/null | \
  sed -r -e '/^(NOTE|ERROR|SENT|SKIP): /d' -e 's/([^ ]+)<([0-9]+):([0-9]+)>( |$)/(\2, \3, \1)\n/g' | \
  sed '/^$/N;/^\n$/D'
(0, 6, Abrams)
(10, 12, wo)
(12, 15, n’t)
(20, 22, go)
(22, 23, .)

This seems to be an issue with discarded matches; i.e., where nothing is inserted in the replacement.

@goodmami goodmami changed the title REPP character positions not always correct REPP character positions don't consider empty replacements Nov 25, 2019
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

1 participant