Note that this function does not attempt to find the longest or shortest namespace prefix in case of conflicts (e.g. when both http://example.edu/ and http://example.edu/data/ are mapped and http://example.edu/data/51937642 is being denormalized). In such case, the first prefix that is found is assigned.