Calculator
A basic calculator for OVOS - "what is 15 times 23", "what is the square root of 144", "what is 20 percent of 150". Fully offline, pure arithmetic, no external dependencies beyond number parsing.
Usage
"what is 5 plus 3"
"what is 15 times 23"
"what is 100 divided by 4"
"what is 20 percent of 150"
"what is 9 squared"
"what is the square root of 144"
"hvad er 5 plus 3" (Danish)
"hvad er kvadratroden af 144" (Danish)
Why one intent file per operation
A single intent like "what is {a} {operator} {b}", with the
operator word captured as a wildcard, does not work reliably in
padatious: with three consecutive wildcards and no literal anchor
word between {a}, {operator}, and {b}, the matcher can't tell
where one wildcard ends and the next begins. Each operation gets its
own intent file instead, with the operator as literal text - the same
anchor-word pattern every other intent in this project family uses
(e.g. ovos-skill-convert's "convert {value} {from_unit} to {to_unit}").
A rough edge fixed here (tracked as an issue elsewhere)
ovos-skill-convert
has an open issue for a cosmetic rough edge: whole-number results
spoken with a trailing ".0" (e.g. "10.0" instead of "10"), because
Python's default float formatting was used as-is. This skill avoids
the problem from the start with a small _format_number() helper - a
whole-number float speaks as a plain integer, a genuine fraction
rounds to 4 decimal places. Worth porting the same helper over when
that issue is picked up.
Common Query safety net
"what is 5 times 6" is structurally identical to the "what is X"
questions confirmed to sometimes get intercepted by a platform-level
semantic router (ovos-m2v-pipeline-high) before this skill's own
Padatious intents get a chance - see
ovos-skill-geometry's
DEVELOPMENT.md for the full live-tested finding. handle_common_query()
reuses the exact literal anchor words each intent file already has
(plus/minus/times/...) as regex patterns, so it's not a second
implementation of the arithmetic parsing, just a fallback entry point
into it.
Install
pip install ovos-skill-calculator
Development
See DEVELOPMENT.md.
Category
Utility
Tags
#calculator #math #arithmetic
Metadata
Release files for ovos-skill-calculator 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovos_skill_calculator-0.0.4.tar.gz | 23.6 kB | With provenance | Details for ovos_skill_calculator-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovos_skill_calculator-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for ovos_skill_calculator-0.0.4-py3-none-any.whl |
Total release size: 50.0 kB
Release files / ovos_skill_calculator-0.0.4.tar.gz
| Download URL | ovos_skill_calculator-0.0.4.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1f049472a4de1903c0554dfaad98c15a4059e8fb7b9da078f2ec05fd0d4bf6a
|
|
BLAKE2b-256 checksum How to use checksums |
ce26c8589669499b7fae586c1a64adae07a3eaf89d507d8a92b9d66ad9c401e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / ovos_skill_calculator-0.0.4-py3-none-any.whl
| Download URL | ovos_skill_calculator-0.0.4-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f52b359b787fd825c06895572d13b94fa16bdb7bf52a0ce28dff48cb903fd17
|
|
BLAKE2b-256 checksum How to use checksums |
17d09dc4f509212d0d7d5230fc4f58a6dd071c1725eef30e93bbd7a3b1586f4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logSecurity for ovos-skill-calculator 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ovos_skill_calculator-0.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.