Database

[{"_id":1,"user":"xyz","sentence":"I watch movies and web series.","nouns":["movies","web series"],"verbs":["watch"]},{"_id":2,"user":"xyz","sentence":"movies are good way to relax","nouns":["movies"],"verbs":["relax"]},{"_id":3,"user":"abc","sentence":"I play cricket.","nouns":["cricket"],"verbs":["play","sleep"]},{"_id":4,"user":"abc","sentence":"I sleep.","nouns":[],"verbs":["sleep"]},]

Query

db.collection.aggregate([{$group:{_id:"$user",sentence:{$push:"$sentence"},verbs:{$push:"$verbs"},nouns:{$push:"$nouns"}}},{$project:{verbs:{$reduce:{input:"$verbs",initialValue:[],in:{$concatArrays:["$$value","$$this"]}}},nouns:{$reduce:{input:"$nouns",initialValue:[],in:{$concatArrays:["$$value","$$this"]}}},sentence:1}},{"$unwind":"$nouns"},{"$group":{"_id":{"_id":"$_id","noun":"$nouns"},"sentence":{"$first":"$sentence"},"key":{"$first":"$_id"},"verbs":{"$first":"$verbs"},"count":{"$sum":1}}},{"$group":{"_id":"$key","sentence":{"$first":"$sentence"},"verbs":{"$first":"$verbs"},"nouns":{$push:{value:"$_id.noun",count:"$count"}}}},{"$unwind":"$verbs"},{"$group":{"_id":{"_id":"$_id","verb":"$verbs"},"sentence":{"$first":"$sentence"},"key":{"$first":"$_id"},"nouns":{"$first":"$nouns"},"count":{"$sum":1}}},{"$group":{"_id":"$key","sentence":{"$first":"$sentence"},"nouns":{"$first":"$nouns"},"verbs":{$push:{value:"$_id.verb",count:"$count"}}}}])

Result