예제 #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)
예제 #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)
예제 #3
0
파일: spelling.py 프로젝트: saul/proselint
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)