Skip to main content

Decode natural language to solve mathemathical calculations

Project description


MIT PRs Welcome

Python package to evaluate natural language mathematical equation and provide its solution For now it supports following operators:

  • ^
  • *
  • /
  • +
  • -
  • square
  • cube
  • sqrt
  • log base 10


I would highly recommend using python virtual environment for installing dependencies and programming. For installation of python virtual environment one can follow the guide.

pip install mathsolver


from mathsolver import mathsolver

mathsolver.solve("What is sum of 5 and 6")
>>> (True, 'Sum of numbers is 11.0', 11.0)
# Result is a Tuple(status, description, value)

mathsolver.solve("what will be result of when 11 is multiplied with seven")
>>> (True, 'Multiplication of 11.0 and 7.0 is 77.0', 77.0)

mathsolver.solve("What will be the division of five hundred and seven and five point six seven")
>>> (True, 'Division of 507.0 and 5.67 is 89.417989418', 89.41798941798942)


  • For now it only supports solving calculations with single operator. Work in progress for multiple operators.


MIT License 2019 © Vikram Singh and contributors

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mathsolver-0.1.0-py2-none-any.whl (7.2 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page