SShortSingh.
Back to feed

Why AI Models Get Locale-Specific Number Formatting Consistently Wrong

0
·1 views

AI language models frequently produce malformed numbers when generating locale-specific output, such as writing '1,234,56' in German by applying the decimal comma rule while ignoring the corresponding shift to a period for thousands grouping. The decimal and thousands separators are a matched pair, and applying only one half renders the number unparseable. The problem is compounded across locales: French, Russian, Polish, and Swedish use non-breaking spaces as group separators, which break standard string comparisons and regex patterns written against ordinary spaces. Swiss German adds a third distinct pattern — apostrophe grouping with a decimal point — while Indian English uses non-uniform digit grouping under the lakh-crore system. The International Bureau of Weights and Measures recommends thin spaces for digit grouping in scientific documents precisely to avoid ambiguity between decimal and grouping characters across conventions.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How to Build an Offline AI Health Analyst on a MacBook Using Llama-3 and MLX

A new tutorial demonstrates how Mac users can analyze their Apple Health data entirely offline using Meta's Llama-3 language model and Apple's MLX framework, eliminating the need to upload sensitive health information to the cloud. The setup runs a 4-bit quantized Llama-3-8B model locally on Apple Silicon chips, taking advantage of the Unified Memory Architecture for fast on-device inference. Users first export their health data from the Apple Health app, then parse metrics such as heart rate and step count from the XML file using Python and Pandas. The processed data is fed into the local model, which generates actionable health insights without any data leaving the device. The approach requires a Mac with an M1, M2, or M3 chip and a few open-source Python libraries to get started.

0
ProgrammingDEV Community ·

Claude Code 2.1.229 adds SSE keepalive pings to fix gateway stream timeouts

Anthropic released Claude Code version 2.1.229 on August 12 UTC, introducing SSE keepalive pings designed to prevent idle-timeout disconnections during extended model-thinking pauses. The fix targets gateway streaming responses routed through Google Vertex AI and Amazon Bedrock upstreams. Teams using enterprise LLM gateways or direct provider connections are advised to upgrade the Claude Code client and verify the fix by testing a workload that previously failed with a stream idle timeout error. Anthropic clarified that the patch addresses only streaming liveness and does not resolve unrelated issues such as expired credentials, provider quotas, or buffering reverse proxies. Platform and developer-experience teams are cautioned to test one variable at a time to accurately attribute any improvements in streaming reliability.

0
ProgrammingDEV Community ·

Kanban Was Born in Japan, Yet Japanese Offices Still Swear by Excel

Toyota engineer Taiichi Ohno developed the Kanban system in the late 1940s and 1950s, drawing inspiration from American supermarket restocking methods to create a visual, pull-based workflow that minimised waste on factory floors. The concept was later adopted by the global tech industry and became a cornerstone of modern agile project management. Despite this Japanese origin, many traditional Japanese workplaces continue to rely heavily on Microsoft Excel for nearly all organisational tasks, from scheduling to project tracking. Excel's unstructured, rules-free flexibility makes it a deeply entrenched cultural tool that resists replacement by more opinionated systems like Kanban boards. A firsthand account from an English school in Japan illustrates this tension, where a sprawling, overloaded Excel file managed all student and staff data until the system began to struggle under its own weight.

0
ProgrammingDEV Community ·

How to Handle Speech-to-Text API Timeouts for Large Audio Uploads in EdTech

Developers building edtech support queues face a critical design challenge when handling large audio file transcriptions via speech-to-text APIs. Rather than relying on a single API call, the recommended approach treats transcription as a multi-stage ingestion workflow with distinct checkpoints for file acceptance, upload completion, transcription result, and output quality. Each stage requires its own state and timestamp to avoid ambiguous failures, such as duplicate transcripts caused by retrying with a new job ID after an unclear client-side timeout. An idempotency policy keyed to a stable recording ID is essential to prevent duplicate work from reaching downstream classifiers. File-size limits should be treated as application-level policy decisions, with rejected recordings retained locally and routed through an approved asynchronous path rather than silently compressed.

Why AI Models Get Locale-Specific Number Formatting Consistently Wrong · ShortSingh