Commenting on each paragraph of node body I want to provide this option in Drupal that users be able to put comment on each paragraph of an article beside putting comment on the whole article.

I use explode command to make an array which contains paragraphs:

$paragraphs = explode("&lt;p&gt;",render($content));


In order to put comment for the whole article I write:

print render($content['comments']);


I am trying to find the file where $content is defined, so I can add another array like $content[]['paragraphcomments'] for comments for each paragraph of an article. Does anyone know in which file $content is defined. Also does anyone have any suggestion?
$contentis defined in node.module in the function template_preprocess_node().
You can add elements to the nodes content using hook_node_view()(D7) or hook_nodeapi() (D6).

See the accepted answer of this question for more details.