Alternatives to bag-of-words based classifiers for text classification? Most of the text classifiers are based on the bag-of-words approach where you loose the context that a particular word appears. As a solution (or simple solution?) we can use n-grams as features. But are there any classifiers which "gist" the idea and model it in someway before training?
 A: I suggest two alternatives, that have been extensively used in Text Classification:


*

*Using Latent Semantic Indexing, which consists of applying Singular Value Decomposition to the DocumentXTerm matrix in order to identify relevant (concept) components, or in other words, aims to group words into classes that represent concepts or semantic fields.

*Using a lexical database like WordNet or BabelNet concepts in order to index the documents, allowing semantic-level comparison of documents. This approach is not statistical, and it faces a problem with Word Sense Disambiguation. 


Both methods can be applied before training. None of the them aim at catching word order.
A: The continuous word representation using Neural Networks is widely used to represent words. Surprisingly, it has the ability to model the semantic context of words, i.e. detect similar words and put them near together in feature space. 
You can use the word2vect tool to process a large text corpus and create word vector. It is worth noting that for specific domain you need utilize a domain specific corpus for constructing word vectors.
A: You should take a look at log-linear models; it's definitely a valid choice in your situation.
A: API models exist which can achieve this.
https://askmacgyver.com/explore/program/universal-topic-classifier/5S2Q5x8K
It takes an array of categories or "bag of words" and a text string to analyze. It then returns a sorted percentage of relevance for this provided keywords.
Input Data
  {
    "text": "this bank provides an excelent service to its clients when opening a new account and with other operations",
    "classes": [
        "bank account",
        "online banking",
        "technical support",
        "mortgage",
        "retirement savings",
        "mutual funds",
        "student loan",
        "credit card",
        "financial news"
    ],
    "minCutOff": "0.001"
}

API Response
{
    "bank account": 0.6448822158372491,
    "technical support": 0.40099627067600924,
    "financial news": 0.28635987039897565,
    "mortgage": 0.2676284175575462,
    "student loan": 0.257628495744561,
    "online banking": 0.32395217514082025,
    "credit card": 0.2144582134037077,
    "mutual funds": 0.09250890827081894,
    "retirement savings": 0.13690496892541437
}

