import re


def remove_address_specifics(text: str) -> str:
    """
    Remove address specifics like, 12th cross road.

    This is to ensure no entity is returned by Rhea.
    """

    patterns = [
        re.compile(pattern, re.I) for pattern in [
            r"(sector|block|floor|main|stage|phase) (\d+)\b", r"(number|no\.?) (\d+)",
            r"(\d+)(?:st|nd|rd|th)? (sector|floor|block|feet road|cross road|road|main|stage|phase)",
            r"(\d+) mall", r"unity (\d+)", r"city cent(er|re|ral) (\d+)", r"(\d+)( )?mg"
        ]
    ]

    for pattern in patterns:
        for match in re.finditer(pattern, text):
            text = text.replace(match.group(), "#" * len(match.group()))
    # remove whitespaces
    text = " ".join(text.split())
    return text