Skip to content

sequence_weirdness returns -1 with U+2019 ’ [Pf] RIGHT SINGLE QUOTATION MARK #153

@guillaumeldc

Description

@guillaumeldc

ftfy.badness.sequence_weirdness("Don’t Follow the Leader")
-1

is this expected?

I looked into the documentation but having a hard time interpreting this result. fix_text works as expected and correct the quote which solves my issue but I wanted to flag my bad strings using a (> 0) condition like in one of your example.
is it safe to just use != 0 instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions