NLP: any classification method about sentence semantics, sentence completeness, and question generation? I come across some interesting areas in natural language processing (NLP) and I am trying to find resources on them. Do you know is there any existing method/research on these NLP areas:


*

*sentence completeness: whether a sentence is a complete sentence.
e.g., "I am a boy" vs "I am boy" OR "Who are you?" vs "Who you?"

*semantic classification: whether the sentence make sense.
e.g., "The dog run" vs "The dog flies"

*question generation: can I generate questions from a sentence.
e.g., "I am a King and I rule the space." --> "Who is King?" "Can king rule the space?"
Thanks!
 A: To some degree, the first two come for free with language modeling. 
In language modeling, we attempt to maximize $E[P(X_{1..T})]$ where $X_{1..T}$ is a sequence of words sampled from our dataset, and $P(X_{1..T})$ is our model. Usually we factor $P(X_{1..T})$ as:
$$P(X_{1..T}) = \prod_{t=0}^T P_\theta(x_t|x_{<t})$$ where $P_\theta(x_t|x_{<t})$ is typically a recurrent neural network.


*

*Sentence completion: given the start of a sentence $x_{1..k}$ simply sample $X_k \sim P_\theta(x_k|x_{<k})$, then increment $k$ and repeat until encountering an end-of-sentence symbol.

*Semantic classification: simply check using a standard parser whether the sentence is syntactically valid. If it is, then you can say the next word is semantically valid if $\frac{P_\theta(x_k = X_k|x_{<k})}{\max_X P_\theta(x_k = X|x_{<k})}$ is above a certain threshold. Of course if your corpus is filled with semantically invalid statements, then this will fail. This procedure rests on the assumption that semantically valid statements have a reasonable chance of being written down.
