1. A method for document classification, comprising: embedding n-grams from an input text in a latent space; embedding the input text in the latent space based on the embedded n-grams and weighting the n-grams according to a non-linear function q j = 1 Q ⁢ ∑ k = 1 K ⁢ sigmoid ⁡ ( a k · j N + b k ) , using a mixture model on a relative position of the n-grams in the input text, where a k and b k are parameters to be learned, Q = ∑ j = 1 N ⁢ q j and K specify a number of mixture quantities, sigmoid (•) is a non-linear transfer function, q j is the weight associated with a j th n-gram, j signifies the position of an n-gram in the input text, and N is the position of a final n-gram in the input text; classifying the document along one or more axes using a processor; and adjusting weights used to weight the n-grams based on the output of the classifying step.
4. The method of claim 1 , wherein embedding the input text in the latent space further comprises: dividing the input text into sub-parts; forming an embedded representation of each of the sub-parts based on embedded n-grams in each respective sub-part; and concatenating the sub-parts to form an embedded representation of the full input text.