Skip to main content

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.

Tests PyPI version

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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-skill-calculator 0.0.5
File Size Uploaded Provenance Actions
ovos_skill_calculator-0.0.5.tar.gz 16.2 kB With provenance Details for ovos_skill_calculator-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovos-skill-calculator 0.0.5
File Interpreter ABI Platform Actions
ovos_skill_calculator-0.0.5-py3-none-any.whl Python 3 none any Details for ovos_skill_calculator-0.0.5-py3-none-any.whl

Total release size: 34.3 kB

Release files / ovos_skill_calculator-0.0.5.tar.gz

Download URL ovos_skill_calculator-0.0.5.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
90ce896af063fae6d384eb96bad5da038df8c26e856dc892900d763097382d8f
BLAKE2b-256 checksum
How to use checksums
a2b4ba966c85c0a2ffca1b80500714e5acad341e6d021d618fae55c53f5042b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / ovos_skill_calculator-0.0.5-py3-none-any.whl

Download URL ovos_skill_calculator-0.0.5-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6835e867f617ad9888fac3f8698a3379aae820352061aae1209f16b17db011df
BLAKE2b-256 checksum
How to use checksums
a22003db13594a25aaa250dc19d838cac398369f4ab1403f7cbb2917cfa47f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Security for ovos-skill-calculator 0.0.5

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.

Select from 2 files

Attestation for ovos_skill_calculator-0.0.5.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 Nov 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page