10. A system for document classification, comprising: an n-gram embedding module configured to embed n-grams from an input text in a latent space; a document embedding module configured to embed the input the input text in the latent space based on the embedded n-grams, weighted 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-ram in the input text and N is the position of a final n-gram in the input text; a classifier configured to classify the document along one or more axes using a processor; and a weight learning module configured to adjust the weights for the n-grams based on the output of the classifying step.
10. A system for document classification, comprising: an n-gram embedding module configured to embed n-grams from an input text in a latent space; a document embedding module configured to embed the input the input text in the latent space based on the embedded n-grams, weighted 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-ram in the input text and N is the position of a final n-gram in the input text; a classifier configured to classify the document along one or more axes using a processor; and a weight learning module configured to adjust the weights for the n-grams based on the output of the classifying step. 11. The system of claim 10 , wherein the document embedding module is further configured to embed the input text in the latent space as a weighted sum over the embedded n-grams in the input text.