Answers.Body: <p>You can generally identify the mood of a verb by looking at grammatical structures; you don't need any language model for it. The three major moods in English are declarative, interrogative, and imperative. Assuming English is the language you will be working with, here are some questions:</p>
  
  <ul>
  <li>Does he like coffee?</li>
  <li>Is this a piece of chocolate?</li>
  <li>When did you go there?</li>
  <li>How is that possible?</li>
  <li>Have you got any cheese?</li>
  </ul>
  
  <p>Apart from the obvious marker '?', these examples all start with either an auxiliary verb or a <em>wh</em>-word, so are fairly easy to recognise with a simple lookup. The one exception I can think of is an imperative (<em>Do be quiet, please</em>), where the <em>do</em> is followed by a further verb, which wouldn't be the case with a question.</p>
  
  <p>Imperatives:</p>
  
  <ul>
  <li>Go to school now!</li>
  <li>Eat up your vegetables!</li>
  <li>Do shut up.</li>
  <li>Have a go at it!</li>
  </ul>
  
  <p>These start with a main verb in the base form, or with an auxiliary followed by a verb/not a pronoun.</p>
  
  <p>Once you identified all interrogative and imperative sentences, all the remaining ones should be declarative.</p>
  
  <p>So, all you would need is a small list of auxiliary verb, pronouns, and <em>wh</em>-words, and with a bit of simple string matching you should get most of the way there. Undoubtedly there will be some exceptions, but there shouldn't be too many of them.</p>
  
  <p>In other languages there will be similar structures; or there might be explicit markers (eg in Hawai'ian an imperative starts with the marker 'e', as in <em>Hele 'oe ma ka hale</em> "you go to the house" vs <em>E hele 'oe ma ka hale</em> "Go to the house!") </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T09:27:33.180Z
Answers.LastActivityDate: 2019-02-13T09:27:33.180Z
Answers.UserDisplayName: Oliver Mason
Answers.Body: <p>If you can classify words then you can easily classify sentences. One of interesting problems you can solve then is »what are allowed sentence forms?« How can you classify words? By searching for features that are common between them. These features are all possible truths that are true for a word, like with what other words it appears in same sentence, what is their spatial relation, what is frequency of appearance.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-16T22:08:59.450Z
Answers.LastActivityDate: 2019-03-16T22:08:59.450Z
Answers.UserDisplayName: Tone Škoda
Body: <p>I am a beginner, just started studying around NLP, specifically various language models. So far, my understanding is that -  the goal is to understand/produce natural language.</p>
  
  <p>So far the methods I have studied speak about correlation of words, using correct combination to make a meaningful sentence. I also have the sense that the language modeling does not really care about the punctuation marks (or did I miss it?)</p>
  
  <p>Thus I am curious is there a way they can classify sentence types such as Declarative, Imperative, Interrogative or Exclamatory?</p>
  
Tags: <natural-language-processing><classification><computational-linguistics><semantics>
Title: Is there a way to understand the type of a sentence?
UserDisplayName: Dibyajyoti Mohapatra
ThreadText: # Is there a way to understand the type of a sentence?
  
  (Asked by: username_0 on 2019-02-12)
  
  I am a beginner, just started studying around NLP, specifically various language models. So far, my understanding is that - the goal is to understand/produce natural language.
  
  So far the methods I have studied speak about correlation of words, using correct combination to make a meaningful sentence. I also have the sense that the language modeling does not really care about the punctuation marks (or did I miss it?)
  
  Thus I am curious is there a way they can classify sentence types such as Declarative, Imperative, Interrogative or Exclamatory?
  
  **Tags:** natural-language-processing, classification, computational-linguistics, semantics
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-02-13. Score: 1
  
  You can generally identify the mood of a verb by looking at grammatical structures; you don't need any language model for it. The three major moods in English are declarative, interrogative, and imperative. Assuming English is the language you will be working with, here are some questions:
  
  * Does he like coffee?
  * Is this a piece of chocolate?
  * When did you go there?
  * How is that possible?
  * Have you got any cheese?
  
  Apart from the obvious marker '?', these examples all start with either an auxiliary verb or a *wh*-word, so are fairly easy to recognise with a simple lookup. The one exception I can think of is an imperative (*Do be quiet, please*), where the *do* is followed by a further verb, which wouldn't be the case with a question.
  
  Imperatives:
  
  * Go to school now!
  * Eat up your vegetables!
  * Do shut up.
  * Have a go at it!
  
  These start with a main verb in the base form, or with an auxiliary followed by a verb/not a pronoun.
  
  Once you identified all interrogative and imperative sentences, all the remaining ones should be declarative.
  
  So, all you would need is a small list of auxiliary verb, pronouns, and *wh*-words, and with a bit of simple string matching you should get most of the way there. Undoubtedly there will be some exceptions, but there shouldn't be too many of them.
  
  In other languages there will be similar structures; or there might be explicit markers (eg in Hawai'ian an imperative starts with the marker 'e', as in *Hele 'oe ma ka hale* "you go to the house" vs *E hele 'oe ma ka hale* "Go to the house!")
  
  
  ---
  
  ### Answer by username_2 on 2019-03-16. Score: 0
  
  If you can classify words then you can easily classify sentences. One of interesting problems you can solve then is »what are allowed sentence forms?« How can you classify words? By searching for features that are common between them. These features are all possible truths that are true for a word, like with what other words it appears in same sentence, what is their spatial relation, what is frequency of appearance.
  
  
  ---
  
  