nschneid / activedop

A treebank annotation tool based on a statistical parser that is re-trained during annotation
GNU General Public License v2.0
3 stars 1 forks source link

error entering edit mode for a sentence #48

Closed nschneid closed 1 month ago

nschneid commented 2 months ago
image

The sentence: "just sitting here thinking about it I would estimate that there are over 600 billion species of insect in my basement alone which _. is a real puzzle because we pay 16 $ a month to have a man come and spray an allegedly lethal chemical all over the place"

nschneid commented 2 months ago

This looks like the problem:

 :Head (D :t "16" :p "$"))
                    :Head (Nom
                        :Head (N)))
bwaldon commented 1 month ago

This error was due to the old regime of punctuation handling: handle_punctuation() identified initial/trailing punctuation sequences on terminal nodes, via a regex query that would always treat $ on its own as trailing punctuation of the preceding terminal node. At that point, $ would be stripped from its original position (leading to an illicit 'empty' terminal) and treated as a :p tag of the preceding terminal.

We shouldn't see this behavior after https://github.com/nschneid/activedop/commit/c349d9b2aef192b28d519d6e5f3f90ae69304e36 (and I just loaded your sentence into activedop edit mode w/ no issues), so I think we can close this issue.