The Ranker transformer appears to default to assigning different ranks when the values of the specified ranking field are the same.
For instance, when Ranker is applied as follows on a corpus of Tweets:
ranker = Ranker(
obj_type = "utterance",
score_func = lambda utt: utt.meta["overall_engagement"],
score_attribute_name = "overall_engagement",
rank_attribute_name = "rank_within_conversation"
)
A ranking order is imposed by default when there is no inherent order based on the specified field:
