You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of them modify the FST in-place, others don't and return a new FST. This is not at all reflected in their return values - some in-place operations return self while others return None.
If some in-place operations return self, then they should all return self so that they can be chained, particularly since some of them which currently return None are non-destructive. These are the ones that should return something and currently don't:
tr_sort (really important, so you can do fst1.tr_sort(False).compose(fst2.tr_sort(True)) for instance)
rm_epsilon(not an in-place operation either! the version in algorithmsdoes return a new FST) SEE BELOW
tr_unique
Also the in-place nature isn't documented, but that is fixed by #278
The text was updated successfully, but these errors were encountered:
Note that #278 would have to be updated with these changes ... I'll wait for a review, if you approve both of these then I can merge them into a new PR.
Some of them modify the FST in-place, others don't and return a new FST. This is not at all reflected in their return values - some in-place operations return
self
while others returnNone
.If some in-place operations return
self
, then they should all returnself
so that they can be chained, particularly since some of them which currently returnNone
are non-destructive. These are the ones that should return something and currently don't:tr_sort
(really important, so you can dofst1.tr_sort(False).compose(fst2.tr_sort(True))
for instance)rm_epsilon
(not an in-place operation either! the version inSEE BELOWalgorithms
does return a new FST)tr_unique
Also the in-place nature isn't documented, but that is fixed by #278
The text was updated successfully, but these errors were encountered: