Where can I find a software library for pairwise matching (ideally, Python, R, Java)?
If you can transform those sentences into number vectors (e.g. into a bag of words or tf-idf representation), I guess you could use k-Means or hierarchical clustering functionality from Orange, a GUI and machine learning library written in Python.

It also has an add-on for text mining specifically, but I cannot attest to it as I haven't tried it yet.