• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jqueguiner / num2words2
95%
main: 95%

Build:
Build:
LAST BUILD BRANCH: feat/sentence-multilang-ordinals
DEFAULT BRANCH: main
Repo Added 17 Jan 2026 05:49PM UTC
Token Bt3d6ZRNkMfP1R29FrGOxHISSecLQRVXP regen
Build 375 Last
Files 339
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH v1.0.13
branch: v1.0.13
CHANGE BRANCH
x
Reset
Sync Branches
  • v1.0.13
  • add-26-missing-languages
  • add-croatian-language-support-v2
  • add-greek-language-support-v2
  • automated-pypi-publishing
  • ci/add-python-3.14-3.15
  • ci/auto-release-notes
  • ci/camo-cache-purge
  • ci/credit-contributors
  • ci/improve-coverage
  • docs/comprehensive-reference
  • feat/256-364-3decimal-cheque
  • feat/478-aviation-phraseology
  • feat/478-aviation-service-profiles
  • feat/478-en-aero
  • feat/584-fractions
  • feat/sentence-multilang-ordinals
  • fix/478-icao-strict-digits
  • fix/603-decimal-precision
  • fix/ar-e2e-stale-comma
  • fix/aur-ssh-key-newline
  • fix/lint-coverage-exhaustive
  • fix/tr-correctness-487-128
  • fix/upstream-313-en_in-default-inr
  • fix/upstream-431-425-cz-dk-aliases
  • fix/upstream-476-id-str-to-number
  • fix/upstream-483-ru-default-rub
  • fix/upstream-560-uk-gender
  • fix/upstream-573-sv-triple-t
  • fix/upstream-591-am-stray-m
  • force-test-run
  • main
  • master
  • port/upstream-293-id-constants
  • port/upstream-314-romansh
  • port/upstream-370-sv-fyrtio
  • port/upstream-383-uz-cyrl
  • port/upstream-451-dhivehi
  • port/upstream-467-es-crc
  • port/upstream-499-ro-mega-de
  • port/upstream-517-en-large-numbers
  • port/upstream-538-ar-lbp
  • port/upstream-548-en-np
  • port/upstream-556-ko-ordinal
  • port/upstream-559-ru-gender
  • port/upstream-563-ar-yer-usd
  • port/upstream-586-es-hn
  • port/upstream-588-kn-cardinal
  • port/upstream-612-it-currencies
  • port/upstream-613-de-currencies
  • port/upstream-614-fr-currencies
  • port/upstream-615-pt-currencies
  • port/upstream-620-ligurian
  • port/upstream-632-it-diciotto
  • port/upstream-642-nl-duizend
  • port/upstream-652-en-ne
  • port/upstream-654-en-in-crore
  • track-missing-languages
  • v1.0.1
  • v1.0.10
  • v1.0.11
  • v1.0.12
  • v1.0.14
  • v1.0.15
  • v1.0.16
  • v1.0.17
  • v1.0.2
  • v1.0.9

01 May 2026 02:23PM UTC coverage: 95.199% (-0.07%) from 95.27%
25217941190

push

github

web-flow
feat(fraction): add to_fraction + 'n/d' string routing (#113)

Implements savoirfairelinux/num2words#584 — fraction support across
the dispatcher.

Public API:
  - num2words('1/3', lang='en')        # 'one third'
  - num2words('-3/4', lang='fr')       # 'moins trois quarts'
  - num2words('1/100', lang='de')      # 'ein Hundertstel'
  - explicit:  to_fraction(num, denom) on any converter

Plumbing:
  - Num2Word_Base.to_fraction() default = '<cardinal num> <ordinal denom>[s]'
  - Dispatcher detects 'n/d' string pattern (with whitespace tolerance)
    and routes directly to converter.to_fraction(int, int)
  - 'fraction' added to CONVERTES_TYPES

Per-language idiomatic forms:
  - English:    half/halves, quarter/quarters; ordinal+s otherwise
  - French:     demi(s), tiers (invariant), quart(s); ordinal+s otherwise
  - Spanish:    medio(s), tercio(s), cuarto(s); 'un' for numerator 1
  - Italian:    mezzo/mezzi; ordinal -o → -i for plural
  - Portuguese: meio(s), terço(s); inherited by pt_BR
  - German:     halb/halbe + Drittel/Viertel/...el (invariant plural);
                'ein' rather than 'eins' for numerator 1; 'Hundertstel'
                drops the redundant 'ein' prefix from einhundert

Edge cases handled:
  - 0/3 → 'zero' (collapses to cardinal)
  - 1/1 → 'one' (denominator 1 collapses to cardinal)
  - 1/-3 and -1/3 both → 'minus one third'
  - 1/0 → ZeroDivisionError

Tests: tests/test_584_fractions.py — 21 cases covering all six
languages, idiomatic vs ordinal-fallback denominators, signs, edge
cases, and the dispatcher's pattern recognition (whitespace, currency
not falsely routed).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

7988 of 8770 branches covered (91.08%)

Branch coverage included in aggregate %.

203 of 232 new or added lines in 9 files covered. (87.5%)

42165 of 43912 relevant lines covered (96.02%)

5.76 hits per line

Relevant lines Covered
Build:
Build:
43912 RELEVANT LINES 42165 COVERED LINES
5.76 HITS PER LINE
Source Files on v1.0.13
  • Tree
  • List 335
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
25217941190 v1.0.13 feat(fraction): add to_fraction + 'n/d' string routing (#113) Implements savoirfairelinux/num2words#584 — fraction support across the dispatcher. Public API: - num2words('1/3', lang='en') # 'one third' - num2words('-3/4', lang='fr') ... push 01 May 2026 02:24PM UTC web-flow github
95.2
See All Builds (162)

Badge your Repo: num2words2

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc