{"categories":[{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic/2"}],"enrichment":{"capability":"Converts written-out number words in text to their digit equivalents, handling both formal and informal phrasing across a range of scales and styles.","skillfed_tags":["nlp","speech-to-text","text-normalization"],"use_cases":["Clean up Alexa or Lex transcription output where spoken numbers appear as words rather than digits.","Normalize user input from voice interfaces before storing or processing numeric data.","Parse informal written descriptions containing number words (e.g., chat logs, survey responses) into machine-readable form.","Convert year expressions in narrative text (\"born in nineteen ninety two\") to standard numeric format.","Handle ordinal references in text (\"the fourth cousin\") by converting them to digit form for indexing or comparison."],"what_it_does":"text2digits is a lightweight Python library that recognizes number words written as text\u2014like \"twenty ten\", \"one thousand six hundred sixty six\", or \"negative thirty seven\"\u2014and replaces them with their numeric equivalents in a string. It handles both cardinal numbers (one, two, three) and ordinals (first, second, third), supports informal year-style concatenation (\"twenty ten\" becomes \"2010\"), and works with multiple number systems including the Indian scales (lakh, crore, arab, kharab). The library is designed for post-processing speech-to-text output, particularly from voice assistants like Alexa or Lex, where spoken numbers arrive as words and need to be normalized to digits.\n\nThe package has no runtime dependencies and installs as a pure Python wheel. It recognizes a wide variety of phrasings\u2014both formal and conversational\u2014and can correct minor spelling variations. Known limitations include that negative numbers preserve the word \"negative\" rather than converting to a minus sign, and ordinal suffixes are dropped by default (\"third\" becomes \"3\" not \"3rd\") unless explicitly enabled. Decimal literals adjacent to scale words are supported (\"2.5 thousand\" becomes \"2500\").","worth_installing":"Yes. The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well\u2014converting spoken/written number words to digits. It's particularly valuable if you work with speech-to-text pipelines. The MIT license imposes no restrictions. No known vulnerabilities. Install it if you need this conversion; skip it if your input is already numeric."},"id":"text2digits","links":{"html":"https://skillfed.io/packages/text2digits","md":"https://skillfed.io/packages/text2digits.md","pypi":"https://pypi.org/project/text2digits/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-28","license_spdx":null,"license_treatment":"permissive","name":"text2digits","python_support":"supports_current","summary":"A small library to convert text numbers to digits in a string"},"popularity":{"monthly_downloads":242404,"position":8857,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.2"}
