解码自然语言求解数学计算

mathsolver的Python项目详细描述


数学求解器

MITPRs Welcome

python包求值自然语言数学方程及其求解 目前它支持以下运算符:

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

安装

我强烈建议使用python虚拟环境来安装依赖项和编程。对于python虚拟环境的安装,可以遵循guide

pip install mathsolver

用法

frommathsolverimportmathsolvermathsolver.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)

注释

  • 目前它只支持用一个运算符求解计算。正在为多个操作员工作。

许可证

麻省理工学院许可证2019©Vikram Singh和contributors

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Clojure关键字在内存中的大小是多少?   Java中有固定长度的通用数组对象吗?   PostgreSQL:通过Java更新我的用户表   错误:使用java解析xml   java Json显示列表中对象的名称   java比较JodaTime时区   与JAVA中的API和包的区别?   java的int值在for循环中不改变   谷歌应用引擎中的java RSA   迁移到spring 5后出现java非法字符错误   java Websphere管理控制台不工作   JavaGSON如何始终在json中包含毫秒?   带有空格和双引号的windows Java ProcessBuilder命令参数失败   java错误:重复的zip条目[43.jar:org/apache/http/annotation/NotThreadSafe.class]