The HP wiki states:
"A ghost is the disembodied spirit of a once-living wizard or witch... These fleshless spirits were either afraid of death or have some extraordinarily strong connection to the locations they haunt.
However, in Tales of Beedle the Bard, Dumbledore's notes have a footnote mentioning ghosts attached to the idea of "maintaining the illusion of our loved ones’ continuing presence", where JKR says
[Wizarding photographs and portraits move and (in the case of the latter) talk just like their subjects. Other rare objects, such as the Mirror of Erised, may also reveal more than a static image of a lost loved one. Ghosts are transparent, moving, talking and thinking versions of wizards and witches who wished, for whatever reason, to remain on earth. JKR]
Additionally, they are also calling imprints of souls a couple of times in canon, by Snape and by Nearly-Headless Nick.
These instances imply that the ghosts of HP's world may just be entities akin to a more advanced version of Wizarding portraits. However, the idea of the ghosts really being the souls of the deceased seems quite entrenched in general fan discussions, ime.
So, is there any place in canon which refers to ghosts as actual spirits of the deceased? Or any information from canon which refers to ghosts as more than just a photo (so to say) of the soul?