axanthos / pycrab

GNU General Public License v3.0
0 stars 0 forks source link

biography of word #6

Open JohnAGoldsmith opened 3 years ago

JohnAGoldsmith commented 3 years ago

This is a question that arose because I am adding "scratchpad" for each word, and the scratchpad is a list (its order describes the sequence of events in analyzing a word).

My question is why _suffixal_biography is a dict (rather than a list). Its order is important for the same reason. Currently it appears to get its order from "analyses_list". This functionality appears to assume that a function could only appear once in a word's history, and we cannot guarantee that.In fact, it seems likely that it will happen.

So I would suggest we make biographies a list as well.

axanthos commented 3 years ago

Absolutely right. We could reimplement word biographies as lists of tuples (function, parse). As a side affect, that will enable us to get rid of the "analyses_run" attribute of Morphology.