Wolfram|Alpha in Spanish
Wolfram|Alpha en español

Francisco Javier Rodríguez Arias
Manager, WRSA Avanced Projects

ABSTRACT

“Wolfram|Alpha Spanish” is the next localization project of Wolfram|Alpha to be released after the last year release of Wolfram|Alpha Japanese. We will overview the Wolfram|Alpha localization project and do a summary of challenges and progress, with focus this time on the Spanish version.

Outline

Wolfram|Alpha introduction

Localization project

Challenges

Spanish around the world

Wolfram|Alpha Spanish demo

Wolfram|Alpha introduction

Wolfram|Alpha is a unique system for computing answers and providing knowledge — Computational Knowledge Engine

The primary product form is the public website www.wolframalpha.com.

Released in May, 2009

It has become one of the most popular Wolfram products.

Goal: “Making the world’s knowledge computable.”

Wolfram|Alpha introduction (2)

Natural language querying interface

allows questions/queries to be given in natural language, initially only in English.

Systematic curated data

many trillions of pieces of data in 1000+ knowledge domains

numerical, textual, binary types of data, but textual data is almost always in English

and sometimes data sources used for constructing the W|A’s knowledgebase are English-only and sometimes US-primary, 
e.g. flights, significantly more granular data for US places such as USStateData

Computational intelligence

domain expertise built into the system as automated methods and algorithms for solving problems and deriving interesting information from data

Dynamic presentation of computational knowledge

generation and formatting of results, summaries, and visualizations

sometimes can have English-language or US oriented designs and conventions

Localization project — motivation

Initially Wolfram|Alpha was developed only in English, and we wanted to make it accessible internationally.

EntityList[EntityClass["Language", "TotalSpeakers" -> GreaterThan[50000000]]]

Localization project — overview

Goal: Make computational knowledge more accessible and useful internationally.

Goal of first release: make all math-related features in W|A localized to 日本語 (Japanese), español (Spanish), 中文 (Chinese), 한국어 (Korean), français (French) and русский (Russian).

This project is built over English Wolfram|Alpha.

Localization team consists in developers, translators, testers and data curators, who are language natives. Many more people are also involved in different degrees.

Localization project — status

Wolfram|Alpha Japanese was released on June 2018: ja.wolframalpha.com.

Next release: Wolfram|Alpha Spanish — es.wolframalpha.com.

Current translation progress (not considering Entity paclets):

Challenges

Large amount of data to translate (millions of tokens, thousands of grammar rules, millions of names, etc.).

Content included in many different components in the system need to be translated.

Content and answers are computed dynamically, which means the logic to compute them may need to consider each language particularity.

Challenges — setence building

Most display strings are incorporated as part of the main base code, and usually assumes English order and style. Building sentences from their base components is problematic.

Grammatical agreement between different words is very important in some languages (gender, case, etc.), so we need to consider it when building up sentences. For example, agreement rules in romance languages are more complex than in other languages.

Definite and indefinite articles have different convetions in different languages.

Other languages need auxiliary words to express figures, as it happens in Asian languages, where there is the need of a counting word. Or cases where numbers need to agree with the noun, like in Spanish ordinal numbers, or like in Russian where the noun uses a different inflection depending on the number value.

All these issues required refactoring code, and creation of new auxiliary function to do inflections and word manipulations.

Challenges — decimal separator

SI (Système International d’Unités) establishes the comma and the point as valid decimal separators.

The comma as decimal separator is used by most European languages, excepting English, and the point is used by the rest of languages.

In Spanish in particular, the comma used to be the only decimal separator, but now in countries close to US it is no longer the case, and the point is commonly used.

All this means that we need to be able to understand both ways of input, and interpret correctly user intention.

Challenges — date and time

Formatting date and time is in particular difficult when we consider that not only the language matters, but the location.

For a simple question, like “¿qué hora es?” (what time is it?), we may answer in different formats depending on user location:

From Champaign:

From Spain:

From Perú:

Challenges — numbers

Numbers should be formatted using the right decimal separator for the language.

Which large numbers have a particular name is different in each language, while most European languages use a separation of 3 digits, in some Asian languages it is common to split every 4 digits.

Example answers for query “Spain population”:

({{English:, about 46.4 million people}, {Japanese:, 約4635 万 人}, {Spanish:, aproximadamente 46,4 millones de personas}})

Challenges — one character words

In Spanish, letters as “a”, “e”, “o”, “u”, “y” have their own meaning as word, and are very common.

The main problem with those letters, is that it is common to find them as variable names in math expressions.

Grammar and tokenizer rules needed to adapt very well to such cases, and it tries to figure out what the user intention.

The algorithm tries it best to figure out the right interpretation, but Some times it tries hard but it cannot make a difference, other times it can, some examples:

“resolver x+y=3 y x-y=8”

“solución a x+3=10” vs “solución para x+3=10”

Spanish around the world

Spanish language is official in 17 countries, de facto (at different levels) in 6 countries, and with a large presence in many more countries:

Spanish around the world

In terms of population, there are around 545 million Spanish speakers (from them 500 million are native speakers). America continent contains the largest Spanish population: 465 million.

Wolfram|Alpha Spanish demo

Main page: es.wolframalpha.com

Examples:

“raíz cuadrada de veinticinco más diez”

“tercer dígito de pi”

“1,5+1.5”

“¿qué hora es?”

“¿qué día es hoy?”

“integra x^2 seno(x)”

“límite de 1 / (x + 1) cuando x tiende a -1 desde la izquierda”

“resolver x+y=3 y x-y=8”

“solución a x+3=10”

“solución para x+3=10”

Acknowledgement

Big thanks to all the localization team!