@staticmethod<EOL><INDENT>def is_package(name):<DEDENT>
name = name.lower()  <EOL>packages = pkg_resources.working_set.by_key.keys()<EOL>for package in packages:<EOL><INDENT>if package.lower().replace("<STR_LIT:->", "<STR_LIT:_>") == name:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Check if string maps to a package installed via pip.

        name (unicode): Name of package.
        RETURNS (bool): True if installed package, False if not.

        From https://github.com/explosion/spaCy/blob/master/spacy/util.py