The Team

Card image cap

DE BORJA, JOHN MICHAEL

Card image cap

LATURNAS, REDEL

Card image cap

TRESVALLES, IRISH

About Us

Hello! We are college students from the Technological Institute of the Philippines, and this website you’re viewing is our work for our thesis course.

Transpose, this website of ours, is made to help learners understand math translations easier. The functionalities and theme of the website are minimal by design so we can guide our users more efficiently.

We’ve come up with this idea because of our personal experience about how some of our younger family members struggle with stuff like math phrase translations as well, so we wanted our thesis to assist them (and others with similar experiences) in their learning journey.

If you have some questions (or if you just want to say hi!) please feel free to contact us at our socials!

How Does the Translate Page Work?

The server that the website uses allows us to run a script that we have in our hands(or kind of stored in our accounts in their servers), and that script we use contains the algorithm which does the translation!

We’ve generalized the major processes the algorithm goes through to give us an output in the Translate page:

Pre-processing

Pre-processing is a general term that says we try to shape and form the data we plan to use. Data tends to be noisy, and computers don’t like noise, so we must help our computers understand what we want them to see.

For example, we have this sentence “Y added to the product of 2, forty-four, eight, and a number.”. We will follow a series of steps which cleans our input one by one.

  1. Turn all letters into lowercase
  2. Ignore all unwanted punctuations (e.g. remove the period)
  3. remove words that don’t add value to the sentence (e.g. “a”, “of”, “the”)
Applying these steps should give us a more readable input for the computer, “y added to product 2, forty-four, eight, and a number”. Of course there’s more nuance to actual application of this in code, but this is the general idea of the term “pre-processing”.

Conversion(Processing)

This section is divided into three different conversion steps, number conversion, word conversion, and tree conversion.

1. Numbers conversion: Convert all worded numbers into numbers
From y added to product 2,

forty-four

,

eight

, and a number

to y added to product 2,

44

,

8

, and a number
2. Word conversion: Convert all unknown words into variable
From y added to product 2, 44, 8, and

a number


to y added to product 2, 44, 8, and

x

3. Tree conversion: Convert the input to a readable format for the algorithm
Now that the input has been cleaned, and constants and variables have been determined, our algorithm should be able to see how the structure of the sentence should be. In a nutshell, we defined our own grammar rules which allows the algorithm to identify the valid math phrases in the sentence. Using the pre-process example, this is what the algorithm will see as the sentence structure.

Grammar Tree


There is more that can be said in this image but suffice to say, the algorithm thinks that the sentence is valid, we just need to do some post-processing.

We decided this is a good way of representing math phrases so we can easily see the sentence agreement in the input (which belongs to which), so the algorithm knows which to include in an enclosing parentheses and not.

Post-processing

Post-processing is also another general term when we want to reformat the current output into a simpler form.

In our situation, to post-process this, we will have to rely on our own logic to transform it. If we assume that the BLUE words in the tree image are instructions and structure definitions, the algorithm should be able to convert the tree into an Object List, which we can then convert the obvious keywords into math operators.

For example, the grammar tree above will be converted into

=> [y, more_than, [product, 2, 44, 8, x]]
=> [[product, 2, 44, 8, x], +, y]
=> [[2, *, 44, *, 8, *, x], +, y]
=> (2 * 44 * 8 * x) + y


And the algorithm completes its instructions!