Exemplo n.º 1
0
def check(text):
    """Check the text."""
    err = "consistency.spacing"
    msg = "Inconsistent spacing after period (1 vs. 2 spaces)."

    regex = ["[\.\?!] [A-Z]", "[\.\?!]  [A-Z]"]
    return consistency_check(text, [regex], err, msg)
Exemplo n.º 2
0
def check(text):
    """Check the text."""
    err = "consistency.spacing"
    msg = "Inconsistent spacing after period (1 vs. 2 spaces)."

    regex = [r"[\.\?!] [A-Z]", r"[\.\?!]  [A-Z]"]
    return consistency_check(text, [regex], err, msg)
Exemplo n.º 3
0
def check(text):
    """Check the text."""
    err = "consistency.spelling"
    msg = "Inconsistent spelling of '{}' (vs. '{}')."

    word_pairs = [
        ["advisor", "adviser"],
        # ["analyse", "analyze"],
        ["centre", "center"],
        ["emphasise", "emphasize"],
        ["finalise", "finalize"],
        ["focussed", "focused"],
        ["labour", "labor"],
        ["learnt", "learned"],
        ["organise", "organize"],
        ["organised", "organized"],
        ["organising", "organizing"],
        ["recognise", "recognize"],
    ]

    return consistency_check(text, word_pairs, err, msg)