find most similar frequency list, defined with respect to op, of |x>
the back-end to this operator uses normed-frequency-class
-- load some knowledge:
-- in this case US census frequency list of male, female and last names:
-- NB: unfortunately this is super memory hungry!
-- define our operator:
guess-name-type |*> #=> find-topic[names] to-lower |_self>
-- ask about 'Emma'
90.323|female name> + 9.677|last name>
-- ask about 'Gina'
-- ask about 'Mark'
54.664|male name> + 28.633|last name> + 16.703|female name>
-- ask about 'Fred'
63.294|male name> + 28.418|last name> + 8.288|female name>
-- ask about 'Branson'
-- define our guess-gender operator:
name-type |male name> => |male>
name-type |female name> => |female>
guess-gender |*> #=> clean select[1,1] name-type find-topic[names] to-lower |_self>