The function f(x) takes words as input and returns a value between 0 and 1 indicating the strength of association with the concepts of computer programming and mathematics. The function is more selective for words related to computer programming, and less selective for words related to mathematics.