sympify('Expression')
What sorts of things is it able to parse?
I don't know if there is a well structured glossary of SymPy
functions. The default namespace (what gets imported with "from sympy
import *") is the best place to start.
Aaron Meurer
On Wed, May 13, 2020 at 11:19 AM Moses Paul <iammos...@gmail.com> wrote:
>
> So I've been working on an NLP parser for sympy.
> This is how it works,
>
> The Input is first "cleaned up" and rewritten into a structure that is comprehended by a NMT model (seq2seq)
> The processed input is passed on to the model which then gives a specific type of output, which is then "processed".
> The final result is one that works when used inside
> sympify('Expression')
>
> So Far I've been able to train using data generated from Functions similar to Sum, Max, Min i.e functions with a list of inputs and also with functions such as Summations and Integrals.
> Since I haven't gone through SymPy's entire codebase, it would be really useful if I had sort of a Glossary or an equivalent structure from which I can glean information about the various functions SymPy has, like a list of single parameter functions, two parameters, multiple parameters and so on.
>
> I haven't been able to find anything so far, help would be much appreciated
>
> Cheers
> Moses Paul
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.
what be the maximum of D, m => Max ( D , m )
what be the max of D, m => Max ( D , m )
what be the biggest of D, m => Max ( D , m )
find the sum of D, m => sum ( D , m )
find the total of D, m => sum ( D , m )
find the minimum of D, m => Min ( D , m )
find the min of D, m => Min ( D , m )
find the smallest of D, m => Min ( D , m )
find the maximum of D, m => Max ( D , m )
find the max of D, m => Max ( D , m )
>>> sympify('Max(1, 2, 3)')
3
>>> sympify('Max(1, 2, x)')
Max(2, x)
(ps I'm aware that the examples (sum, Max) I gave up there use iterables )Here's an excerpt from the model training dataset
what be the maximum of D, m => Max ( D , m )
what be the max of D, m => Max ( D , m )
what be the biggest of D, m => Max ( D , m )
find the sum of D, m => sum ( D , m )
find the total of D, m => sum ( D , m )
find the minimum of D, m => Min ( D , m )
find the min of D, m => Min ( D , m )
find the smallest of D, m => Min ( D , m )
find the maximum of D, m => Max ( D , m )
find the max of D, m => Max ( D , m )
I think perhaps the greatest use of this parser would be as a
natural language way to find out how to do things in SymPy - so it
would be useful to return the resultant expression unevaluated -
maybe in response to a "how" question.
For that purpose, it would be almost ideal.
Maybe it could also be extended to some vaguer questions such as
:
"How do I evaluate line integrals using SymPy?"
David