解码自然语言求解数学计算
mathsolver的Python项目详细描述
数学求解器
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