Music across genres comprises of specialized schemas at both large and small scales. In the case of Indian art music, musical phrases form categories as defined in the melodic framework of the raga. The phrases, defined by their melodic shapes or time-pitch contours, are salient cues to raga identity and the associated semantics such as affect. The melodic ‘motifs’ across ragas can have small differences in contour shape but signal different ragas. The semantic-cognitive association of the raga-characteristic motifs, linked to long-term memory for trained musicians, makes them akin to linguistic constructs. We present a corpus study of melodic phrase shape as a cue to raga identity to illustrate the invariance of certain aspects such as rhythmic timing and non-standard intonation of specific notes in the presence of the overall context-dependent variability of the given phrase. Next, the perceptual experiment paradigm is drawn from speech perception studies where the categorical perception of acoustic phenomena influences judgements of similarity. While tonal intervals and chords have been part of categorical perception studies in music, there is no similar work involving continuous melodic shape. Synthetic stimuli representing the melodic shape (thus controlling for timbre and loudness dynamics) are generated for listening experiments. Distinctly different behaviors are observed between participants who are highly trained in the genre and those who are not similarly trained. This raises the potential of the presented work for applications in pedagogy.