Example #1
0
def extract_toot(toot):
    text = functions.extract_toot(toot)
    text = re.sub(r"^@[^@]+@[^ ]+\s*", r"", text)  #remove the initial mention
    text = text.lower(
    )  #treat text as lowercase for easier keyword matching (if this bot uses it)
    return text
Example #2
0
def extract_toot(toot):
    toot = functions.extract_toot(toot)
    toot = toot.replace(
        "@", "@\u200B")  #put a zws between @ and username to avoid mentioning
    return (toot)