Answers.Body: <p>One of the ways to ask if this two problmes are related is to ask, could we solve math/algebra equations with NLP approaches, and the answer is yes, it's an absolutely valid idea and it was approached by many researchers.</p>
  <p>For example in the <a href="https://arxiv.org/pdf/1912.01412.pdf" rel="nofollow noreferrer">&quot;Deep learning for symbolic mathemathics&quot;</a> paper by facebook researchers, the NLP-based approach was used to solve calculus-level math.</p>
  <p>Or in <a href="https://arxiv.org/pdf/1811.00720.pdf" rel="nofollow noreferrer">this paper</a> authors propose a method to extract semantics from math problems in words and solve them.</p>
  <p>In fact, even very simple approaches like a small LSTM network <a href="https://machinelearningmastery.com/learn-add-numbers-seq2seq-recurrent-neural-networks/" rel="nofollow noreferrer">could work</a> for simple strictly stated problems</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T16:44:43.443Z
Answers.Text: Interesting. This is actually the direction that I care more about, so I appreciate the references.
Answers.UserDisplayName: user37344
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T11:33:20.437Z
Answers.LastActivityDate: 2021-03-26T17:00:15.917Z
Answers.LastEditDate: 2021-03-26T17:00:15.917Z
Answers.UserDisplayName: Kirill Fedyanin
Answers.Body: <p>Yes there is a relationship, but it's not an exact one like I think is envisioned in the question.</p>
  <p>Fuzzy numbers and fuzzy logic translates natural language expressions into quantitative values and mathematical logic.  See <a href="https://www.sciencedirect.com/science/article/abs/pii/S0020737378800030" rel="nofollow noreferrer">PRUF—a meaning representation language for natural languages</a> by Zadeh.</p>
  <p>Dr. Zadeh, the 'inventor' of fuzzy numbers and fuzzy logic, provided a mathematical framework for taking simple language expressions and expressing them in mathematical form. The underlying basis is that natural language is inherently imprecise. To quote this paper, &quot;First, a basic assumption underlying PRUF is that the imprecision that is intrinsic in natural languages is, for the most part, possibilistic rather than probabilistic in nature.&quot;</p>
  <p>While fuzzy numbers and fuzzy logic are ubiquitous in many applications, for example fuzzy controllers in engineering, I personally have not seen a groundswell of using PRUF in NLP. Not that it isn't possible. I have been pursuing research off-and-on in this area, and I think that there is a possibility of bridging mathematical logic and NLP, particularly when using concept-based NLP (e.g., something along the lines of Cognitive Linguistics).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-12T19:49:52.203Z
Answers.LastActivityDate: 2022-06-12T19:49:52.203Z
Answers.UserDisplayName: George Shannon
Answers.Body: <p>A lot of natural language processing software are (in 2021) using statistical approaches.</p>
  <p>Read <a href="https://rads.stackoverflow.com/amzn/click/com/026203803X" rel="nofollow noreferrer" rel="nofollow noreferrer"><em>The Deep Learning Revolution</em></a> (by T.Sejnowski), <a href="https://rads.stackoverflow.com/amzn/click/com/B00BPAGQWK" rel="nofollow noreferrer" rel="nofollow noreferrer"><em>Artificial Beings, the Conscience of a conscient machine</em></a> (by J.Pitrat), <a href="https://rads.stackoverflow.com/amzn/click/com/0262039516" rel="nofollow noreferrer" rel="nofollow noreferrer"><em>Introduction to Deep Learning</em></a> (by E.Charniak).</p>
  <p>However, mixed approaches (like in <a href="http://refpersys.org/" rel="nofollow noreferrer">RefPerSys</a>) can also be used.</p>
  <p>The so-called <a href="https://en.wikipedia.org/wiki/Frame-based_terminology" rel="nofollow noreferrer">frame-based</a> approaches can, and have been used, in NLP. From an abstract point of view, they are close to algebra. And probably are still one of the best approaches for <em>generating</em> natural language sentences (in written form).</p>
  <p>Pitrat has for dozen of years taught and advocated a symbolic AI approach to NLP. You could read his French book <a href="https://www.decitre.fr/livres/metaconnaissance-9782866012472.html" rel="nofollow noreferrer"><em>Métaconnaissances, futur de l'IA</em></a> (metaknowledge, future of AI).</p>
  <p>Read also books like <a href="https://rads.stackoverflow.com/amzn/click/com/1558609326" rel="nofollow noreferrer" rel="nofollow noreferrer"><em>Knowledge Representation and Reasoning</em></a> (Braqueman &amp; Leveque)</p>
  <p>You might also read (if you can read French) Nicolas Bourbaki's <a href="https://www.amazon.fr/Th%C3%A9orie-ensembles-N-Bourbaki/dp/3540340343" rel="nofollow noreferrer"><em>Théorie des Ensembles</em></a> or (in English) <a href="https://rads.stackoverflow.com/amzn/click/com/3540208542" rel="nofollow noreferrer" rel="nofollow noreferrer"><em>Interactive Theorem Proving and Program Development</em></a> (by Bertot &amp; Castéran).</p>
  <p>Symbolic AI approaches are definitely &quot;algebra-like&quot;. In practice, they don't need powerful GPGPUs, or even don't do a lot of floating point operations.</p>
  <p>I assume you want to process human language text available as textual files (e.g. HTML, XML, UTF8 encoded plain text, etc...). If you want to process sounds and speech (for example, an audio signal coming from a microphone), you do need much more signal processing and floating-point operations. If you want to process images (e.g. handwritten text), it is also different. In France, I would recommend Professor <a href="https://mohammeddaoudi.github.io/" rel="nofollow noreferrer">Mohamed Daoudi</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T16:44:16.037Z
Answers.Text: This looks like good reading, but it's not clear to me that it is relevant to doing algebra.
Answers.UserDisplayName: user37344
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T17:02:27.810Z
Answers.Text: Then please improve your question and explain, in at least one paragraph of written English, what do you mean by "doing algebra". Be aware that I am not a native English speaker. If you don't want to write that publicly, send me an email (with the URL of your question) to `basile@starynkevitch.net` - with several paragraphs in English, French, or Russian
Answers.UserDisplayName: Basile Starynkevitch
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-13T02:45:14.777Z
Answers.Text: @user37344 My sense is that much of computing in general depends on algebra, and that you can't do much with computational linguistics without some algebraic functions. I was likewise confused by the term "computer algebra".  But it seems like basic algebra is not sufficient for NLP of any meaningful strength.
Answers.UserDisplayName: DukeZhou
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-19T21:22:30.870Z
Answers.LastActivityDate: 2021-12-27T13:53:30.550Z
Answers.LastEditDate: 2021-12-27T13:53:30.550Z
Answers.UserDisplayName: Basile Starynkevitch
Answers.Body: <p>There isn't, really. Natural language is way more complex and irregular than algebra, which is far more formalised and unambiguous.</p>
  <p>So far, in NLP, most success/progress has been made in little toy domains, which exclude most of the complexities of real life, including many ambiguities.</p>
  <p>When you say the rules of algebra are somewhat like grammar, then that is because it is essentially a formal language, for which we can specify a grammar. There is currently no complete grammar for any human language (and I doubt there ever will be), let alone a formal one that can be processed by computer.</p>
  <p>This was one of the reasons why the first AI boom, where a lot of over-hyped promises where made about being able to translate Russian into English automatically, failed abysmally: natural languages are more than just formal grammars of lexical items.</p>
  <p>Stochastic approaches have gone some way towards pragmatic solutions, but when it comes to understanding language they are basically a fudge. And don't get me started on deep learning approaches to NLP.</p>
  <p>So the only relationship is that we use the term 'grammar' for the descriptive formalisms in both cases; a formal grammar of algebra would be very different from a grammar for a human language.</p>
  <p>This doesn't mean, however, that approaches developed in the field of NLP cannot be applied to algebra: even those which failed in NLP because they were overly limiting. To find out more about this, look for <a href="https://en.wikipedia.org/wiki/Chomsky_hierarchy" rel="nofollow noreferrer">Chomsky Hierarchy</a> -- that describes the different expressive powers of formal languages.</p>
  <p>But I would argue that human language is outside of that, because it is not a formal language.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T16:46:35.170Z
Answers.Text: Gotcha, but it sounds like you kind of agree that there is a relationship - it's just that the NLP problem is drastically harder and specifically that the hardest parts of NLP are not present in doing algebra.
Answers.UserDisplayName: user37344
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T17:24:14.940Z
Answers.Text: @user37344 Broadly, the only relationship in my view is that we describe both phenomena with formalisms that are called 'grammar', which share a few general features.
Answers.UserDisplayName: Oliver Mason
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-01T21:35:10.463Z
Answers.Text: It is possible to convert natural-language queries into statements that can be solved by computer algebra systems. [Wolfram Alpha](https://www.wolframalpha.com/input/?i=integrate+x%5E3+with+respect+to+u+where+u+%3D+x%5E2) does this, for example.
Answers.UserDisplayName: Anderson Green
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-26T12:42:49.050Z
Answers.LastActivityDate: 2021-03-26T12:42:49.050Z
Answers.UserDisplayName: Oliver Mason
Body: <p>My intuition is that there is some overlap between understanding language and symbolic mathematics (e.g. algebra). The rules of algebra are somewhat like grammar, and the step-by-step arguments get you something like a narrative. If one buys this premise, it might be worth training an AI to do algebra (solve for x, derive this equation, etc).</p>
  <p>Moreover, when variables represent &quot;real&quot; numbers (as seen in physics, for example) algebraic equations describe the real world in an abstracted, &quot;linear,&quot; way somewhat similar to natural language.</p>
  <p>Finally, there are exercises in algebra, like simplifying, deriving useful equations, etcetera which edge into the realm of the subjective, yet it is still much more structured and consistent than language. It seems like this could be a stepping stone towards the ambiguities of natural language.</p>
  <p>Can anyone speak to whether this has either (1) been explored or (2) is a totally bogus idea?</p>
  
Tags: <natural-language-processing><comparison><symbolic-computing>
Title: Is there a relationship between Computer Algebra and NLP?
UserDisplayName: user37344
ThreadText: # Is there a relationship between Computer Algebra and NLP?
  
  (Asked by: username_0 on 2021-03-17)
  
  My intuition is that there is some overlap between understanding language and symbolic mathematics (e.g. algebra). The rules of algebra are somewhat like grammar, and the step-by-step arguments get you something like a narrative. If one buys this premise, it might be worth training an AI to do algebra (solve for x, derive this equation, etc).
  
  Moreover, when variables represent "real" numbers (as seen in physics, for example) algebraic equations describe the real world in an abstracted, "linear," way somewhat similar to natural language.
  
  Finally, there are exercises in algebra, like simplifying, deriving useful equations, etcetera which edge into the realm of the subjective, yet it is still much more structured and consistent than language. It seems like this could be a stepping stone towards the ambiguities of natural language.
  
  Can anyone speak to whether this has either (1) been explored or (2) is a totally bogus idea?
  
  **Tags:** natural-language-processing, comparison, symbolic-computing
  
  ---
  
  ## 4 answers
  
  ### Answer by username_5 on 2021-03-26. Score: 4 | Accepted answer
  
  There isn't, really. Natural language is way more complex and irregular than algebra, which is far more formalised and unambiguous.
  
  So far, in NLP, most success/progress has been made in little toy domains, which exclude most of the complexities of real life, including many ambiguities.
  
  When you say the rules of algebra are somewhat like grammar, then that is because it is essentially a formal language, for which we can specify a grammar. There is currently no complete grammar for any human language (and I doubt there ever will be), let alone a formal one that can be processed by computer.
  
  This was one of the reasons why the first AI boom, where a lot of over-hyped promises where made about being able to translate Russian into English automatically, failed abysmally: natural languages are more than just formal grammars of lexical items.
  
  Stochastic approaches have gone some way towards pragmatic solutions, but when it comes to understanding language they are basically a fudge. And don't get me started on deep learning approaches to NLP.
  
  So the only relationship is that we use the term 'grammar' for the descriptive formalisms in both cases; a formal grammar of algebra would be very different from a grammar for a human language.
  
  This doesn't mean, however, that approaches developed in the field of NLP cannot be applied to algebra: even those which failed in NLP because they were overly limiting. To find out more about this, look for [Chomsky Hierarchy](https://en.wikipedia.org/wiki/Chomsky_hierarchy) -- that describes the different expressive powers of formal languages.
  
  But I would argue that human language is outside of that, because it is not a formal language.
  
  > **Comments:**
  > **username_0**: Gotcha, but it sounds like you kind of agree that there is a relationship - it's just that the NLP problem is drastically harder and specifically that the hardest parts of NLP are not present in doing algebra.  
  > **username_5**: @user37344 Broadly, the only relationship in my view is that we describe both phenomena with formalisms that are called 'grammar', which share a few general features.  
  > **username_6**: It is possible to convert natural-language queries into statements that can be solved by computer algebra systems. [Wolfram Alpha](https://www.wolframalpha.com/input/?i=integrate+x%5E3+with+respect+to+u+where+u+%3D+x%5E2) does this, for example.  
  
  ---
  
  ### Answer by username_1 on 2021-03-26. Score: 3
  
  One of the ways to ask if this two problmes are related is to ask, could we solve math/algebra equations with NLP approaches, and the answer is yes, it's an absolutely valid idea and it was approached by many researchers.
  
  For example in the ["Deep learning for symbolic mathemathics"](https://arxiv.org/pdf/1912.01412.pdf) paper by facebook researchers, the NLP-based approach was used to solve calculus-level math.
  
  Or in [this paper](https://arxiv.org/pdf/1811.00720.pdf) authors propose a method to extract semantics from math problems in words and solve them.
  
  In fact, even very simple approaches like a small LSTM network [could work](https://machinelearningmastery.com/learn-add-numbers-seq2seq-recurrent-neural-networks/) for simple strictly stated problems
  
  > **Comments:**
  > **username_0**: Interesting. This is actually the direction that I care more about, so I appreciate the references.  
  
  ---
  
  ### Answer by username_2 on 2022-06-12. Score: 2
  
  Yes there is a relationship, but it's not an exact one like I think is envisioned in the question.
  
  Fuzzy numbers and fuzzy logic translates natural language expressions into quantitative values and mathematical logic. See [PRUF—a meaning representation language for natural languages](https://www.sciencedirect.com/science/article/abs/pii/S0020737378800030) by Zadeh.
  
  Dr. Zadeh, the 'inventor' of fuzzy numbers and fuzzy logic, provided a mathematical framework for taking simple language expressions and expressing them in mathematical form. The underlying basis is that natural language is inherently imprecise. To quote this paper, "First, a basic assumption underlying PRUF is that the imprecision that is intrinsic in natural languages is, for the most part, possibilistic rather than probabilistic in nature."
  
  While fuzzy numbers and fuzzy logic are ubiquitous in many applications, for example fuzzy controllers in engineering, I personally have not seen a groundswell of using PRUF in NLP. Not that it isn't possible. I have been pursuing research off-and-on in this area, and I think that there is a possibility of bridging mathematical logic and NLP, particularly when using concept-based NLP (e.g., something along the lines of Cognitive Linguistics).
  
  
  ---
  
  ### Answer by username_3 on 2021-03-19. Score: 2
  
  A lot of natural language processing software are (in 2021) using statistical approaches.
  
  Read [*The Deep Learning Revolution*](https://rads.stackoverflow.com/amzn/click/com/026203803X) (by T.Sejnowski), [*Artificial Beings, the Conscience of a conscient machine*](https://rads.stackoverflow.com/amzn/click/com/B00BPAGQWK) (by J.Pitrat), [*Introduction to Deep Learning*](https://rads.stackoverflow.com/amzn/click/com/0262039516) (by E.Charniak).
  
  However, mixed approaches (like in [RefPerSys](http://refpersys.org/)) can also be used.
  
  The so-called [frame-based](https://en.wikipedia.org/wiki/Frame-based_terminology) approaches can, and have been used, in NLP. From an abstract point of view, they are close to algebra. And probably are still one of the best approaches for *generating* natural language sentences (in written form).
  
  Pitrat has for dozen of years taught and advocated a symbolic AI approach to NLP. You could read his French book [*Métaconnaissances, futur de l'IA*](https://www.decitre.fr/livres/metaconnaissance-9782866012472.html) (metaknowledge, future of AI).
  
  Read also books like [*Knowledge Representation and Reasoning*](https://rads.stackoverflow.com/amzn/click/com/1558609326) (Braqueman & Leveque)
  
  You might also read (if you can read French) Nicolas Bourbaki's [*Théorie des Ensembles*](https://www.amazon.fr/Th%C3%A9orie-ensembles-N-Bourbaki/dp/3540340343) or (in English) [*Interactive Theorem Proving and Program Development*](https://rads.stackoverflow.com/amzn/click/com/3540208542) (by Bertot & Castéran).
  
  Symbolic AI approaches are definitely "algebra-like". In practice, they don't need powerful GPGPUs, or even don't do a lot of floating point operations.
  
  I assume you want to process human language text available as textual files (e.g. HTML, XML, UTF8 encoded plain text, etc...). If you want to process sounds and speech (for example, an audio signal coming from a microphone), you do need much more signal processing and floating-point operations. If you want to process images (e.g. handwritten text), it is also different. In France, I would recommend Professor [Mohamed Daoudi](https://mohammeddaoudi.github.io/).
  
  > **Comments:**
  > **username_0**: This looks like good reading, but it's not clear to me that it is relevant to doing algebra.  
  > **username_3**: Then please improve your question and explain, in at least one paragraph of written English, what do you mean by "doing algebra". Be aware that I am not a native English speaker. If you don't want to write that publicly, send me an email (with the URL of your question) to `basile@starynkevitch.net` - with several paragraphs in English, French, or Russian  
  > **username_4**: @user37344 My sense is that much of computing in general depends on algebra, and that you can't do much with computational linguistics without some algebraic functions. I was likewise confused by the term "computer algebra".  But it seems like basic algebra is not sufficient for NLP of any meaningful strength.  
  
  ---
  
  