qurator-spk / dinglehopper

An OCR evaluation tool
Apache License 2.0
58 stars 12 forks source link

Update RapidFuzz again #69

Closed mikegerber closed 2 years ago

mikegerber commented 2 years ago

For now, we stick to rapidfuzz ~ 2.0.0, because later rapidfuzz seems to produce un-slice-able editops (see #67). I've reverted #67 for now, but, when fixed, the changes needs to be merged again.

maxbachmann commented 2 years ago

Hm, I never added the slicing feature when creating my own Editops class. I can add slicing to the Editops class. Right now there are two workarounds for your slicing: convert to list which is essentially what was done in the old API

>>> ops.as_list()[1:]

modify in place:

del ops[0]
maxbachmann commented 2 years ago

since you use

ops = ops[1:]

I would use

del ops[0]

since it avoids creating a copy of the container

mikegerber commented 2 years ago

I would use

del ops[0]

since it avoids creating a copy of the container

Good idea, I'll change it.

mikegerber commented 2 years ago

c4e85da5aba03e7b0a71f6b4af972a7d8430f56a fixes this, the remaining problem is currently not of relevance for the normal operation of dinglehopper I think.