Answers.Body: <p>Let start by classify the phrases you propose:</p>
  
  <ol>
  <li>The cat drinks milk. => action</li>
  <li>Sun is yellow. => descriptive/declarative, immutable</li>
  <li>I was at work yesterday. => descriptive, time related</li>
  </ol>
  
  <p>1) The easiest ones are always the descriptive and immutable (in the context) phrases as "Sun is yellow.". Some usual representations:</p>
  
  <ul>
  <li>prolog: </li>
  </ul>
  
  <blockquote>
    <p>color('Sun',yellow).</p>
  </blockquote>
  
  <p>or simply:</p>
  
  <blockquote>
    <p>yellow('Sun').</p>
  </blockquote>
  
  <ul>
  <li>object oriented: </li>
  </ul>
  
  <blockquote>
    <p>Sun.color=yellow</p>
  </blockquote>
  
  <p>2) When the fact is time related as in "I was at work yesterday", we divide the description in a time indicator and a immutable fact: </p>
  
  <ul>
  <li>prolog: </li>
  </ul>
  
  <blockquote>
    <p>when(yesterday,at(I,workplace)).</p>
  </blockquote>
  
  <p>note how when has two parts, the time identification and the immutable fact.</p>
  
  <p>Another prolog variant is:</p>
  
  <blockquote>
    <p>at(I,workplace,[when(yesterday)]).</p>
  </blockquote>
  
  <p>where the content in the list (brackets) means "optional related facts".</p>
  
  <ul>
  <li>object oriented: </li>
  </ul>
  
  <blockquote>
    <p>I.at = { </p>
    
    <p>position = workplace;</p>
    
    <p>when = yesterday</p>
    
    <p>}</p>
  </blockquote>
  
  <p>3) Actions as "The cat drinks milk." are a few more difficult:</p>
  
  <ul>
  <li>prolog: </li>
  </ul>
  
  <blockquote>
    <p>drinks(cat,milk).</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>action(cat,drinks,milk).</p>
  </blockquote>
  
  <ul>
  <li>object oriented: </li>
  </ul>
  
  <blockquote>
    <p>cat.drinks=[milk]</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>cat.action = { </p>
    
    <p>action=drinks</p>
    
    <p>object=milk</p>
    
    <p>}</p>
  </blockquote>
  
  <p>Obviously, these are only the main ideas, there are as many representations as different programs, but most of them handles same kind of structures.</p>
  
  <p>( note: the term "computer understandable" is ambiguous. <strong>Current computer doesn't understand anything</strong>. We say these expression are understandable in the sense that its compiler/interpreter accepts them, and describes the content of the phrase, and the program can transform them to other results).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-23T09:10:18.147Z
Answers.LastActivityDate: 2018-02-23T09:28:24.527Z
Answers.LastEditDate: 2018-02-23T09:28:24.527Z
Answers.UserDisplayName: pasaba por aqui
Answers.Body: <p>People normally represent sentences like this as vectors of a specific length, normally about 2500 in length. The algorithm that can do this is sentence2vec. It is basically a derivative of word2vec. It allows you to train a model that can transform sentences into vectors that you can then feed into a neural network or another algorithm. You can check out the paper, which you should be able to find on google scholar. If you need the link, I can get it. Another possibility is word embeddings, which I have not found a good paper on, but cortical.io has a free API that allows you to mess around with their implementation. The word embeddings mimic the real human brain much better based on our current research, but sentence2vec/word2vec is used much more often in practice.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-23T09:14:28.433Z
Answers.Text: I think you are talking about a very specific are of applied AI.
Answers.UserDisplayName: pasaba por aqui
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-23T09:15:44.837Z
Answers.Text: "The word embeddings mimic the real human brain much better" : it is difficult to prove true or false of this statement, taken into account that what we known about logic of brain is ... nothing.
Answers.UserDisplayName: pasaba por aqui
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-23T15:23:11.490Z
Answers.Text: @pasabaporaqui it based on research done by the neuroscientist Jeff Hawking, and based on our current research it is much more similar to the human brain than conventional neural networks. Also, this area of AI is pretty much basic Natural Languages Processing.
Answers.UserDisplayName: Aiden Grossman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-23T00:04:28.347Z
Answers.LastActivityDate: 2018-02-23T15:37:27.007Z
Answers.LastEditDate: 2018-02-23T15:37:27.007Z
Answers.UserDisplayName: Aiden Grossman
Body: <p>I am absolutely new in the AI area.</p>
  <p>I would like to know how to mathematically/logically represent the <strong>sense</strong> of sentences like:</p>
  <ol>
  <li>The cat drinks milk.</li>
  <li>Sun is yellow.</li>
  <li>I was at work yesterday.</li>
  </ol>
  <p>So, that it could be converted to computer understandable form and analysed algorithmically.</p>
  <p>Any clue?</p>
  
Tags: <logic><knowledge-representation>
Title: How to mathematically/logically represent the sense of sentences like "The cat drinks milk"?
UserDisplayName: NoWar
ThreadText: # How to mathematically/logically represent the sense of sentences like "The cat drinks milk"?
  
  (Asked by: username_0 on 2018-02-22)
  
  I am absolutely new in the AI area.
  
  I would like to know how to mathematically/logically represent the **sense** of sentences like:
  
  1. The cat drinks milk.
  2. Sun is yellow.
  3. I was at work yesterday.
  
  So, that it could be converted to computer understandable form and analysed algorithmically.
  
  Any clue?
  
  **Tags:** logic, knowledge-representation
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-02-23. Score: 2 | Accepted answer
  
  Let start by classify the phrases you propose:
  
  1. The cat drinks milk. => action
  2. Sun is yellow. => descriptive/declarative, immutable
  3. I was at work yesterday. => descriptive, time related
  
  1) The easiest ones are always the descriptive and immutable (in the context) phrases as "Sun is yellow.". Some usual representations:
  
  * prolog:
  
  > color('Sun',yellow).
  
  or simply:
  
  > yellow('Sun').
  
  * object oriented:
  
  > Sun.color=yellow
  
  2) When the fact is time related as in "I was at work yesterday", we divide the description in a time indicator and a immutable fact:
  
  * prolog:
  
  > when(yesterday,at(I,workplace)).
  
  note how when has two parts, the time identification and the immutable fact.
  
  Another prolog variant is:
  
  > at(I,workplace,[when(yesterday)]).
  
  where the content in the list (brackets) means "optional related facts".
  
  * object oriented:
  
  > I.at = {
  >
  > position = workplace;
  >
  > when = yesterday
  >
  > }
  
  3) Actions as "The cat drinks milk." are a few more difficult:
  
  * prolog:
  
  > drinks(cat,milk).
  
  or
  
  > action(cat,drinks,milk).
  
  * object oriented:
  
  > cat.drinks=[milk]
  
  or
  
  > cat.action = {
  >
  > action=drinks
  >
  > object=milk
  >
  > }
  
  Obviously, these are only the main ideas, there are as many representations as different programs, but most of them handles same kind of structures.
  
  ( note: the term "computer understandable" is ambiguous. **Current computer doesn't understand anything**. We say these expression are understandable in the sense that its compiler/interpreter accepts them, and describes the content of the phrase, and the program can transform them to other results).
  
  
  ---
  
  ### Answer by username_2 on 2018-02-23. Score: 1
  
  People normally represent sentences like this as vectors of a specific length, normally about 2500 in length. The algorithm that can do this is sentence2vec. It is basically a derivative of word2vec. It allows you to train a model that can transform sentences into vectors that you can then feed into a neural network or another algorithm. You can check out the paper, which you should be able to find on google scholar. If you need the link, I can get it. Another possibility is word embeddings, which I have not found a good paper on, but cortical.io has a free API that allows you to mess around with their implementation. The word embeddings mimic the real human brain much better based on our current research, but sentence2vec/word2vec is used much more often in practice.
  
  > **Comments:**
  > **username_1**: I think you are talking about a very specific are of applied AI.  
  > **username_1**: "The word embeddings mimic the real human brain much better" : it is difficult to prove true or false of this statement, taken into account that what we known about logic of brain is ... nothing.  
  > **username_2**: @username_1 it based on research done by the neuroscientist Jeff Hawking, and based on our current research it is much more similar to the human brain than conventional neural networks. Also, this area of AI is pretty much basic Natural Languages Processing.  
  
  ---
  
  