A Unified Probabilistic Approach to Referring Expressions