1. A computer-implemented method of training a neural network, comprising: training a first neural network of a self organizing map type with a first set of first text documents each containing one or more keywords in a semantic context to map each document to a point in the self organizing map by semantic clustering; performing a reverse indexing by determining, for each keyword occurring in the first set, all points in the self organizing map to which first documents containing said keyword are mapped, and storing said mapped points as a pattern for said keyword in a pattern dictionary; forming at least one sequence of keywords from a second set of second text documents each containing one or more keywords in a semantic context; translating said at least one sequence of keywords into at least one sequence of patterns by using said pattern dictionary; and training a second target neural network with said at least one sequence of patterns.