SMS: Inference of hyperedges and overlapping communities in hypergraphs