leon
leon copied to clipboard
Entities does not recognize arithmetics symbols : How to do a "maths" package ?
Question
When ask Leon "How much is 4 + 5 ?", the NLU gives me this json as a result :
{
"lang": "en",
"package": "maths",
"module": "calculator",
"action": "run",
"query": "How much is 4 + 5 ?",
"entities": [
{
"sourceText": "4",
"utteranceText": "4",
"entity": "number",
"resolution": {
"strValue": "4",
"value": 4,
"subtype": "integer"
}
},
{
"sourceText": "5",
"utteranceText": "5",
"entity": "number",
"resolution": {
"strValue": "5",
"value": 5,
"subtype": "integer"
}
}
]
}
It successfully recognize the numbers to deal with. However, it does not recognize the arithmetic symbol, so my module do not know either what to do with it. What can I do to fix it ?
Para crear un paquete matemático en Python, puede seguir los siguientes pasos:
- Cree un nuevo directorio para su paquete.
- Cree un archivo init.py en el directorio que acaba de crear.
- Cree un archivo con el nombre de su módulo y agregue sus funciones matemáticas.
- Cree un archivo setup.py para su paquete.
- Ejecute el siguiente comando para construir su paquete: "python setup.py sdist".
- Ejecute el siguiente comando para instalar su paquete: "pip install dist /
-<versión>.tar.gz".
Si necesita más ayuda, hágamelo saber y estaré encantado de ayudarle. 😊
Origen: Conversación con Bing, 27/5/2023 (1) Cómo hacer un modelo matemático: 9 Pasos (con imágenes). https://es.wikihow.com/hacer-un-modelo-matem%C3%A1tico. (2) Editor de ecuaciones y fórmulas matemáticas | MathType - Wiris. https://www.wiris.com/es/mathtype/. (3) Cómo construir tu primer paquete de Python - freeCodeCamp.org. https://www.freecodecamp.org/espanol/news/como-construir-tu-primer-paquete-de-python/.