import re
NOTXY = [r"\bnot\s+(?:just|only|merely|simply)?\s*[^.!?;]{1,60}?,\s*(?:but|it'?s|it is|they'?re|they are)\b",
         r"\b(?:it'?s|it is|this is|that'?s|that is)\s+not\s+(?:about\s+)?[^.!?;]{1,60}?[,;\u2014-]\s*(?:it'?s|it is|but)\b",
         r"\b(?:isn'?t|aren'?t|wasn'?t)\s+(?:just\s+|only\s+|about\s+)?[^.!?;]{1,60}?[,;\u2014-]\s*(?:it'?s|it is|they'?re|but)\b"]
def measure(text):
    words = len(text.split())
    em = text.count("\u2014"); en = text.count("\u2013"); dd = text.count(" -- ")
    notxy = sum(len(re.findall(p, text, flags=re.I)) for p in NOTXY)
    return {"words": words, "em_dash": em, "en_dash": en, "double_hyphen": dd, "not_x_but_y": notxy}
