install pip install auto_abbr usage from abbr import get_abbr print(get_abbr('China Eastern Airlines'))