https://github.com/opencog/opencog/blob/master/opencog/nlp/scm/nlp-utils.scm#L513
or
https://github.com/opencog/opencog/blob/master/opencog/nlp/scm/nlp-utils.scm#L553

should be handy enough