We formulate, using the discrete nonlinear Schrödinger equation (DNLS), a general approach to encode and process information based on reservoir computing. Reservoir computing is a promising avenue for realizing neuromorphic computing devices. In such computing systems, training is performed only at the output level by adjusting the output from the reservoir with respect to a target signal. In our formulation, the reservoir can be an arbitrary physical system, driven out of thermal equilibrium by an external driving. The DNLS is a general oscillator model with broad application in physics, and we argue that our approach is completely general and does not depend on the physical realization of the reservoir. The driving, which encodes the object to be recognized, acts as a thermodynamic force, one for each node in the reservoir. Currents associated with these thermodynamic forces in turn encode the output signal from the reservoir. As an example, we consider numerically the problem of supervised learning for pattern recognition, using as a reservoir a network of nonlinear oscillators.