BearBlogtech

Go back

The Aymara Algorithm and Computational Translation

15 july 2026

In 1992 I spent 2 months in Bolivia, I visited a number of places including lake TitiKaka (the highest navigable lake in the world, Lapaz, Tiwanaku and many others. The people are welcoming and warn. The official language is Spanish, but the Quechua and Aymara people continue to speak thier natives languages.


Attention !!! Some photos with 1992 quality ...


1 image

The Bennet Monolith 7.3 M high 20 tons

2 image

The Gateway of the sun

6 image

The Tiwanaku temple

5 image

Go to Copacabana a city on the shore of lake Titicaca, No bridge

3 image

Sunset on the shore of lake Titicaca

4 image

Copacabana Sunset on the shore of lake Titicaca


Ok what is the point of this ?

The Aymara algorithm

The Aymara algorithm is a rule-based machine translation system created by a Bolivian engineer Iván Guzmán de Rojas in the 1980s.

By treating Aymara grammar an ancient Andean language with strict logical syntax—as a matrix of algebraic operators, the algorithm enabled fast, bidirectional multi-language translations without recursive translation limits.


Core Linguistics and the ILRA Bridge

The Aymara language is predominantly spoken in the Andes, it appeared approximately 2000 to 3000 years ago. It is a highly structured agglutinative language containing no irregular verbs or grammatical gender.

Meaning is built by adding specific, predictable suffixes to root words. He possess a unique conceptualization of time : they talk about the past as being "in front" of them because it is know and visible to the mind's eye, while the unknown futur is "behind" them as it is unseen.

Mr Guzmán used these syntactical traits to develop a conceptual bridge language called ILRA (Intermediate Language for Machine Translation). Instead of translating directly from a Source Language to a Target Language, the Aymara algorithm follows three distinct phases :

1. Syntactic Deconstruction : Translates the source text into the algebraic structures of ILRA.
2. Matrix Logic Processing : Performs matrix calculations to deduce pure mathematical meaning.
3. Target Generation : Translates ILRA concurrently into any desired target language.

This matrix-based, algebraic system allowed one language (ILRA) to bridge multiple target languages (such as Spanish, German, French, and English). This framework demonstrated how indigenous syntactical structures could solve complex computational translation problems.

The original algorithm and code from 1980s are not completely open-sourced or public, but with python, numpy and the help of Ollama and LLM model GLM, it's quite easy and really really fast to build a "translating machine"


Python Simulation: Agglutinative Matrix Translation

We can programmatically simulate the core mathematical concept. The following snippet models a parsing engine that maps root words and suffixes into an algebraic vector matrix space, using it as an intermediate bridge to generate multiple target languages.
NOTE : HTML has made some change is the spacing and format , if you copy/paste this code, make sure to verify spacing. You can refer to PEP 8 Style Guide

Prerequisites :
A linux pc or a linux vm with a recent vesion of python
This script requires the `numpy`, the library is installed from bash with pip

create a venv with python -v .venv
activate the venv, with source .venv/bin/activate
install the numpy package with pip3 install numpy


Python Script (`aymara_translation.py`)
import numpy as np

# 1. Define our Matrix Space (ILRA Intermediate Vocabulary & Logic)
# Rows: Root concepts, Columns: Suffix/Modal logical modifiers
CONCEPT_MAP = {
   "ut": 0, # House (Root)
   "muna": 1 # To want/love (Root)
}

SUFFIX_MAP = {
   "base": 0, # Nominal base form
   "ni": 1, # Possession suffix ("with / has")
   "ru": 2 # Directional suffix ("towards")
}

# 2. Target Language Generative Matrices (Mapping ILRA coordinates to syntax) SPANISH_DECODER = {
   (0, 0): "casa",
   (0, 1): "dueño de casa (el que tiene casa)",
   (0, 2): "hacia la casa",
   (1, 0): "querer"
}
ENGLISH_DECODER = {
   (0, 0): "house",
   (0, 1): "house owner (one who has a house)",
   (0, 2): "towards the house",
   (1, 0): "to want"
}

def aymara_to_matrix(root, suffix="base"):
   """
   Simulates the Aymara parsing engine: Convert word + suffix into an algebraic matrix vector.
   """
   # Create an empty state vector matrix
   state_matrix = np.zeros((len(CONCEPT_MAP), len(SUFFIX_MAP)))
   # Locate the algebraic coordinate
   row = CONCEPT_MAP.get(root)
   col = SUFFIX_MAP.get(suffix)
   if row is not None and col is not None:
   state_matrix[row, col] = 1 # Active operator state
   return state_matrix
   else:
   raise ValueError("Unknown linguistic element.")

def matrix_to_target(state_matrix, target_decoder):
  """
  Translates the structural ILRA matrix directly into the final target language output.
  """
  # Find the active indices via matrix operations
  indices = np.argwhere(state_matrix == 1)
  if len(indices) == 0:
   return "Unknown"

# Extract coordinate tuple
  coord = (indices[0][0], indices[0][1])
  return target_decoder.get(coord, "Translation not mapped")

# --- EXECUTION DEMONSTRATION ---
if __name__ == "__main__":
   # Input Aymara word components: "uta" (house) + "-ru" (directional suffix meaning 'towards')
   aymara_root = "ut"
   aymara_suffix = "ru"

   print(f"Parsing Aymara: '{aymara_root}' + '-{aymara_suffix}'")

   # Step 1: Encode phrase into the mathematical ILRA bridge representation
   ilra_matrix = aymara_to_matrix(aymara_root, aymara_suffix)
   print("\nGenerated ILRA Matrix Representation:")
   print(ilra_matrix)

   # Step 2: Use the matrix vector to concurrently decode into target languages
   translation_es = matrix_to_target(ilra_matrix, SPANISH_DECODER)
   translation_en = matrix_to_target(ilra_matrix, ENGLISH_DECODER)

   print(f"\nTranslated to Spanish: {translation_es}")
   print(f"Translated to English: {translation_en}")

And voila... a very old lagnguage that can help to build a translating machine. May be there is other algorithm hidden in other languages... like semitic origin languages or indo-European origin, maybe LLM can help to find them.


To finish another interesting point (with the help of google and gemini)

Trivalent Logic in the Aymara Machine Translation Architecture

In the context of the Aymara algorithm, Bolivian engineer Iván Guzmán de Rojas discovered that the core limitation of standard machine translation engines was their reliance on traditional Western, bivalent logic (where statements must strictly be True or False).

The Aymara language naturally utilizes a trivalent (three-valued) logical system, explicitly accommodating Uncertainty/Doubt directly into its grammatical syntax. Guzmán formalized this linguistic phenomenon mathematically to construct the ILRA interlingua engine.