Text this: Machine learning aided computational study of functional groups for water purification and Li recycle