def gferror(reply):
    """Determines if a GF reply is an error"""
    return (reply.startswith('The parser failed')
            or reply.startswith('The sentence is not complete')
            or reply.startswith('Warning:')
            or reply.startswith('Function') and reply.endswith('is not in scope'))