spraakbanken / swell-editor

Editor for normalising learner texts (error annotation and tagging.)
MIT License
9 stars 3 forks source link

Disallow tokens that are not referenced by any edge #120

Closed arildm closed 5 years ago

arildm commented 5 years ago

If there is a token without an edge, the diff calculation function calculate_diff will choke.

The Graph invariant, described in Representation.md and implemented as check_invariant, determines what the graph datastructure may and may not look like. Extend it, so that it disallows unreferenced tokens.

arildm commented 5 years ago

This already seems to work as suggested. I don't know why I thought it didn't...