  
  
  def set_data_path(path):
      global _data_path
      _data_path = ensure_path(path)
  
  
  def ensure_path(path):
      if isinstance(path, basestring_):
 
</s> remove     if type(data) == dict:
 </s> add     if isinstance(data, dict): </s> remove def is_package(origin):
    """
    Check if string maps to a package installed via pip.
 </s> add def is_package(name):
    """Check if string maps to a package installed via pip.

    Args:
        name (unicode): Name of package.
    Returns:
        bool: True if installed package, False if not.
 </s> remove         if package.project_name.replace('-', '_') == origin:
 </s> add         if package.project_name.replace('-', '_') == name:
    """Set path to spaCy data directory.

    Args:
        path (unicode or Path): Path to new data directory.
    """
  
  
  def set_data_path(path):
    """Set path to spaCy data directory.

    Args:
        path (unicode or Path): Path to new data directory.
    """
      global _data_path
      _data_path = ensure_path(path)
  
  
  def ensure_path(path):
      if isinstance(path, basestring_):
keep keep add keep keep keep keep keep keep
 Add docstrings, error messages and fix consistency 
spacy/util.py