I suggest you first study ambiguous grammars and how to parse them. Here's one paper http://www.cs.berkeley.edu/~fateman/papers/ambigmath.pdf but there are others that you can find.
It is not a case of "writing a program" but solving the problem. Is fx the same as f*x or f(x)? What about sinx, sin x sin x, what does sin x+y mean? same as sin x + y? And we haven't even mentioned "natural language". Good luck. On Monday, February 29, 2016 at 5:26:34 PM UTC-8, Jerry Li wrote: > > Hi, > > I'm currently a first-year undergraduate Engineering student at the > University of Toronto who is fairly experienced with Python, and I'm > interested in contributing to SymPy for GSOC 2016. After familiarizing > myself with the basics of SymPy and reading through GSOC Ideas page, I was > drawn to the idea of improving SymPy Gamma/Live's language recognition so > that it could interpret natural English and text-based math, like Wolfram > Alpha. I understand that the best way of doing this would be to include the > functionality in the SymPy library itself so that it could be called from > SymPy Gamma/Live. > > I've read through the Parsing page in the SymPy wiki > <https://github.com/sympy/sympy/wiki/Parsing>, as well as some related > threads in this mailing list. The thread linked on the wiki especially > seems to include lots of informative discussion, but not much of it was > followed up upon. I've been doing some preliminary research, and I believe > that, with time and a lot of learning, it should be within my scope to > implement a parser that would work for most common English/text inputs and > include some informative error messages to help the user. This perhaps > could involve using adapted code from external libraries and a parser > generator. I'd be willing to put a lot of time into learning new skills to > get the project done. > > I believe that this functionality could improve the user experience of > SymPy Live/Gamma, which would help people out and draw more attention/users > to SymPy. I was also interested in implementing a LaTeX parser, but it > seems like there's some work in progress in that area. > <https://github.com/augustt198/latex2sympy/issues/1> > > Anyways, I was mostly wondering if anyone had input on whether or not this > would be a suitable project to pursue for GSoC, and if there were any > suggestions on recommended approaches. If so, I'll do some more research > and start drafting up a proposal. If not, I'll look into other potential > things to contribute in for SymPy. In terms of the patch requirement for > GSoC, I've submitted one bug fix pull request which was merged so far, and > will be looking for more opportunities to do so in the next few weeks. > > Thanks, > Jerry > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/7654ef68-e30c-4e28-ae32-2fd014a7f94e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
