leon icon indicating copy to clipboard operation
leon copied to clipboard

Entities does not recognize arithmetics symbols : How to do a "maths" package ?

Open ThomasRitaine opened this issue 4 years ago • 1 comments

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 ?

ThomasRitaine avatar Dec 17 '20 18:12 ThomasRitaine

Para crear un paquete matemático en Python, puede seguir los siguientes pasos:

  1. Cree un nuevo directorio para su paquete.
  2. Cree un archivo init.py en el directorio que acaba de crear.
  3. Cree un archivo con el nombre de su módulo y agregue sus funciones matemáticas.
  4. Cree un archivo setup.py para su paquete.
  5. Ejecute el siguiente comando para construir su paquete: "python setup.py sdist".
  6. 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/.

garcialazcanofernando avatar May 27 '23 07:05 garcialazcanofernando