lingpy / linse

A Python library for the manipulation of linguistic sequences.
Apache License 2.0
2 stars 1 forks source link

refactored TypedSequence #29

Closed xrotwang closed 10 months ago

xrotwang commented 11 months ago

@LinguList I'm not sure if the "strict" behaviour is really needed. As far as I can tell, it may be rather confusing - e.g. if you concatenate strict and non-strict sequences, etc.

LinguList commented 11 months ago

Seems we won't need it! I am testing at the moment the new typedsequence. I think it is much, much better in this way.

It also helps to slim down lots of custom code in linse that I only wrote to maintain the problems with strings and plusses. Just found out, that one function in linse, where one returns a flat list out of a nested list of morphemes, can now just be ignored/deleted, since one can just use itertools.chain(*w) to get a representation of a word chained by all morphemes without boundary markers.

LinguList commented 11 months ago

One think I thought of is that we could add the possibility to segments to account for the slash notation that we use in lexibank and other cases (t?/ts for t? found in data and interpreted as ts by us).