comicbox.series_name ¶
Series names, normalized for comparing.
One normalizer for the online matcher and for reading lists, so a name the matcher compares and a name a reading list keys on are the same string.
fold_text(text) ¶
Fold text for searching, as series names are folded but for volumes.
A search for volume 3 means those words; normalize_series would strip them.
Source code in comicbox/series_name.py
37 38 39 40 41 42 43 44 | |
normalize_series(name) ¶
Normalize a series name for comparing.
Latin accents are dropped (Pokémon is pokemon), case is folded, a volume suffix is stripped, and every run of characters that are not letters or digits, in any script, becomes one space, so ワンピース keeps a name. Only the Combining Diacritical Marks block is dropped: other combining marks, such as kana voicing (ピ is not ヒ), are part of the letter and recompose with it. An ASCII name normalizes as lowercase letters and digits with single spaces between them.
Source code in comicbox/series_name.py
22 23 24 25 26 27 28 29 30 31 32 33 34 | |