Vabungula


Vabungula - Lorêm Number Algorithm

The following is pseudocode for an algorithm that converts any non-negative integer from zero to 999,999,999,999 into the Lorêm number.


If input-number is zero
    display 'gafono'
    exit and end run
Endif.

Parse number into four groups of three digits, working from right to left,
  keeping digits in left-to-right order within each group.
From right to left these four groups of three digits will be:
  units-group
  thousands-group
  millions-group
  billions-group.
*Note: Examples for various input values:
*    123,456,789,806 => units-group     = 806
*                       thousands-group = 789
*                       millions-group  = 456
*                       billions-group  = 123
*    123,000,000,001 => units-group     = 001
*                       thousands-group = 000
*                       millions-group  = 000
*                       billions-group  = 123
*             12,345 => units-group     = 345
*                       thousands-group = 012
*                       millions-group  = 000
*                       billions-group  = 000
*                  5 => units-group     = 005
*                       thousands-group = 000
*                       millions-group  = 000
*                       billions-group  = 000

Initialize hold-output, work-input, work-output, copula.

If billions-group > 000
   Move the three digits of billions-group to work-input
   Move 'ela' to copula
   Perform TRANSLATE-GROUP3
   Move work-input to hold-output
   Initialize work-input, work-output
Endif.

If millions-group > 000
   Move the three digits of millions-group to work-input
   Move 'ova' to copula
   Perform TRANSLATE-GROUP3 
   Perform MERGE-GROUPS
   Initialize work-input, work-output
Endif.

If thousands-group > 000
   Move the three digits of thousands-group to work-input
   Move 'ina' to copula
   Perform TRANSLATE-GROUP3 
   Perform MERGE-GROUPS
   Initialize work-input, work-output
Endif. 

If units-group > 000
   Move the three digits of units-group to work-input
   Move spaces to copula
   Perform TRANSLATE-GROUP3 
   Perform MERGE-GROUPS
Endif. 

Display hold-output.

End run.

TRANSLATE-GROUP3 Subroutine:

If  work-input = 001 
and copula > spaces
   move copula to work-output
   exit subroutine    
endif.

Initialize w1 thru w7.
    
Evaluate work-input(1)
   When 1
      Move space to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 2
      Move 'bêl' to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 3
      Move 'an'  to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 4
      Move 'ban' to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 5
      Move 'kol' to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 6
      Move 'ol'  to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 7
      Move 'sal' to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 8
      Move 'as'  to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
   When 9
      Move 'dek' to w1
      Move 'u'   to w2
      Move 'z'   to w3
      Move 'a'   to w7
End-evaluate.

Evaluate work-input(2)
   When 1
      Move space  to w3
      Move 're  ' to w4
      Move 's'    to w5
      Move 'a'    to w7
   When 2
      Move space  to w3
      Move 'bêre' to w4
      Move 's'    to w5
      Move space  to w7
   When 3
      Move 'are'  to w4
      Move 's'    to w5
      Move space  to w7
   When 4
      Move space  to w3
      Move 'bare' to w4
      Move 's'    to w5
      Move space  to w7
   When 5
      Move space  to w3
      Move 'kore' to w4
      Move 's'    to w5
      Move space  to w7
   When 6
      Move 'ore'  to w4
      Move 's'    to w5
      Move space  to w7
   When 7
      Move space  to w3
      Move 'sare' to w4
      Move 's'    to w5
      Move space  to w7
   When 8
      Move 'ase'  to w4
      Move 's'    to w5
      Move space  to w7
   When 9
      Move space  to w3
      Move 'dere' to w4
      Move 's'    to w5
      Move space  to w7
End-evaluate.

Evaluate work-input(3)
   When 1   
      Move space     to w5
      Move 'sên'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'a'   to w7
      Endif
   When 2
      Move space     to w5
      Move 'bêl'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'ê'   to w7
      Endif
   When 3
      Move 'an'      to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'a'   to w7
      Endif
   When 4
      Move space     to w5
      Move 'ban'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'a'   to w7
      Endif
   When 5
      Move space     to w5
      Move 'kol'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'o'   to w7
      Endif
   When 6
      Move 'ol'      to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'o'   to w7
      Endif
   When 7
      Move space     to w5
      Move 'sal'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'i'   to w7
      Endif
   When 8
      Move 'as'      to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'i'   to w7
      Endif
   When 9
      Move space     to w5
      Move 'dek'     to w6
      If work(2) > 1
          Move space to w7
      Else 
          Move 'a'   to w7
      Endif
End-evaluate.

If copula > spaces
   move copula to w7
Endif.

String non-space values of w1 thru w7 into work-output. 

End of subroutine.    

MERGE-GROUPS Subroutine:

If hold-group = spaces
   Move work-output to hold-group
Else
   If first char of work-output is a consonant
       truncate last two chars of hold-group
   Else
       truncate last char of hold-group
   Endif
   Concatenate hold-group + work-group and store in hold-group
Endif.

End of subroutine. 

End of algorithm.  
 
==========================================

NOTES:

Possible non-space values for w1 thru w7 in TRANSLATE-GROUP3:
 
      w1    w2  w3  w4     w5  w6    w7
    +-----+---+---+------+---+-----+---+
    | bêl | u | z | re   | s | sên | a | 
    | an  |   |   | bêre |   | bêl | ê |   
    | ban |   |   | are  |   | an  | i |
    | kol |   |   | bare |   | ban | o |
    | ol  |   |   | kore |   | kol |   |
    | sal |   |   | ore  |   | ol  |   |
    | as  |   |   | sare |   | sal |   |
    | dek |   |   | ase  |   | as  |   |
    |     |   |   | dere |   | dek |   |
    +-----+---+---+------+---+-----+---+

TRANSLATE-GROUP3 creates w1-w7 values for input as follows:

I/P   w1    w2  w3  w4     w5  w6    w7
    +-----+---+---+------+---+-----+---+
000 |     |   |   |      |   |     |   | <== does not occur
001 |     |   |   |      |   | sên | a |
002 |     |   |   |      |   | bêl | ê |
003 |     |   |   |      |   | an  | a |
004 |     |   |   |      |   | ban | a |
005 |     |   |   |      |   | kol | o |
006 |     |   |   |      |   | ol  | o |
007 |     |   |   |      |   | sal | i |
008 |     |   |   |      |   | as  | i |
009 |     |   |   |      |   | dek | a |
010 |     |   |   | re   | s |     | a |
011 |     |   |   | re   |   | sên | a |
012 |     |   |   | re   |   | bêl | ê |
013 |     |   |   | re   | s | an  | a |
014 |     |   |   | re   |   | ban | a |
015 |     |   |   | re   |   | kol | o |
016 |     |   |   | re   | s | ol  | o |
017 |     |   |   | re   |   | sal | i |
018 |     |   |   | re   | s | as  | i |
019 |     |   |   | re   |   | dek | a |
020 |     |   |   | bêre | s |     |   |
021 |     |   |   | bêre |   | sên |   |
022 |     |   |   | bêre |   | bêl |   |
023 |     |   |   | bêre | s | an  |   |
024 |     |   |   | bêre |   | ban |   |
025 |     |   |   | bêre |   | kol |   |
026 |     |   |   | bêre | s | ol  |   |
027 |     |   |   | bêre |   | sal |   |
028 |     |   |   | bêre | s | as  |   |
029 |     |   |   | bêre |   | dek |   |
030 |     |   |   | are  | s |     |   |
031 |     |   |   | are  |   | sên |   |
032 |     |   |   | are  |   | bêl |   |
033 |     |   |   | are  | s | an  |   |
034 |     |   |   | are  |   | ban |   |
035 |     |   |   | are  |   | kol |   |
036 |     |   |   | are  | s | ol  |   |
037 |     |   |   | are  |   | sal |   |
038 |     |   |   | are  | s | as  |   |
039 |     |   |   | are  |   | dek |   |
040 |     |   |   | bare | s |     |   |
041 |     |   |   | bare |   | sên |   |
042 |     |   |   | bare |   | bêl |   |
043 |     |   |   | bare | s | an  |   |
044 |     |   |   | bare |   | ban |   |
045 |     |   |   | bare |   | kol |   |
046 |     |   |   | bare | s | ol  |   |
047 |     |   |   | bare |   | sal |   |
048 |     |   |   | bare | s | as  |   |
049 |     |   |   | bare |   | dek |   |
050 |     |   |   | kore | s |     |   |
060 |     |   |   | ore  | s |     |   |
070 |     |   |   | sare | s |     |   |
080 |     |   |   | ase  | s |     |   |
090 |     |   |   | dere | s |     |   |
100 |     | u | z |      |   |     | a |
101 |     | u |   |      |   | sên | a |
102 |     | u |   |      |   | bêl | ê |
103 |     | u | z |      |   | an  | a |
104 |     | u |   |      |   | ban | a |
105 |     | u |   |      |   | kol | o |
106 |     | u | z |      |   | ol  | o |
110 |     | u |   | re   | s |     | a |
111 |     | u |   | re   |   | sên | a |
112 |     | u |   | re   |   | bêl | ê |
113 |     | u |   | re   | s | an  | a |
120 |     | u |   | bêre | s |     |   |
121 |     | u |   | bêre |   | sên |   |
122 |     | u |   | bêre |   | bêl |   |
123 |     | u |   | bêre | s | an  |   |
130 |     | u | z | are  | s |     |   |
131 |     | u | z | are  |   | sên |   |
132 |     | u | z | are  |   | bêl |   |
133 |     | u | z | are  | s | an  |   |
140 |     | u |   | bare | s |     |   |
...
200 | bêl | u | z |      |   |     | a |
201 | bêl | u |   |      |   | sên | a |
202 | bêl | u |   |      |   | bêl | ê |
203 | bêl | u | z |      |   | an  | a |
210 | bêl | u |   | re   | s |     | a |
212 | bêl | u |   | re   |   | bêl | ê |
213 | bêl | u |   | re   | s | an  | a |
220 | bêl | u |   | bêre | s |     |   |
221 | bêl | u |   | bêre |   | sên |   |
222 | bêl | u |   | bêre |   | bêl |   |
223 | bêl | u |   | bêre | s | an  |   |
230 | bêl | u | z | are  | s |     |   |
240 | bêl | u |   | bare | s |     |   |
250 | bêl | u |   | kore | s |     |   |
260 | bêl | u | z | ore  | s |     |   |
270 | bêl | u |   | sare | s |     |   |
280 | bêl | u | z | ase  | s |     |   |
290 | bêl | u |   | dere | s |     |   |
300 | an  | u | z |      |   |     | a |
310 | an  | u |   | re   | s |     | a |
320 | an  | u |   | bêre | s |     |   |
330 | an  | u | z | are  | s |     |   | 
340 | an  | u |   | bare | s |     |   |
...
400 | ban | u | z |      |   |     | a |
410 | ban | u |   | re   | s |     | a |
420 | ban | u |   | bêre | s |     |   |
430 | ban | u | z | are  | s |     |   |
440 | ban | u |   | bare | s |     |   |
...
800 | as  | u | z |      |   |     | a |
810 | as  | u |   | re   | s |     | a |
820 | as  | u |   | bêre | s |     |   |
830 | as  | u | z | are  | s |     |   | 
840 | as  | u |   | bare | s |     |   |
...
900 | dek | u | z |      |   |     | a |
910 | dek | u |   | re   | s |     | a |
920 | dek | u |   | bêre | s |     |   |
930 | dek | u | z | are  | s |     |   |
940 | dek | u |   | bare | s |     |   |
    +-----+---+---+------+---+-----+---+

MERGE-GROUPS examples:

Example 1:
Input: 12,345

  MERGE-GROUPS is executed twice:

  1st time:
    hold-group  = spaces
    work-output = 'rebêlina' 

  hold-group is spaces,
   therefore simply move 'rebêlina' to hold-group.

  2nd time: 
    hold-group  = 'rebêlina'
    work-output = 'anubarekol'    

  first char of work-output is not a consonant   
   therefore truncate 'rebêlina' as 'rebêlin'

  then concatenate hold-group + work-output and store in hold-group:
   'rebêlin' + 'anubarekol' = 'rebêlinanubarekol'  

Example 2:
Input: 123,000,000,001

  MERGE-GROUPS is executed only once:

    hold-group  = 'ubêresanela'
    work-output = 'sêna' 

    first char of work-output is a consonant
     therefore truncate 'ubêresanela' as 'ubêresane'

    then concatenate hold-group + work-output and store in hold-group:
     'ubêresane' + 'sêna' = 'ubêresanesêna'

Example 3:
Input: 123,456,789,806

  MERGE-GROUPS is executed three times:

  1st time:
    hold-group  = 'ubêresanela'
    work-output = 'banukoresolova' 
  
  first char of work-output is a consonant
   therefore truncate 'ubêresanela' as 'ubêresane'  

  then concatenate hold-group + work-output and store in hold-group:
   'ubêresane' + 'banukoresolova' 
     = 'ubêresanebanukoresolova'

  2nd time:
    hold-group  =  'ubêresanebanukoresolova'
    work-output = 'saluzasedekina'

  first char of work-output is a consonant
   therefore truncate 'ubêresanebanukoresolova' 
    as 'ubêresanebanukoresolo'

  then concatenate hold-group + work-output and store in hold-group:
   'ubêresanebanukoresolo' + 'saluzasedekina' 
     = 'ubêresanebanukoresolosaluzasedekina'

  3rd time:
    hold-group  = 'ubêresanebanukoresolosaluzasedekina'
    work-output = 'asuzolo'

  first char of work-output is not a consonant
   therefore truncate 'ubêresanebanukoresolosaluzasedekina' 
    as 'ubêresanebanukoresolosaluzasedekin' 
  
  then concatenate hold-group + work-output and store in hold-group:
   'ubêresanebanukoresolosaluzasedekin' + 'asuzolo' 
     = 'ubêresanebanukoresolosaluzasedekinasuzolo'  


Grammar of Vabungula | Alphabet | Nouns | Pronouns | Adjectives | Prepositions | Conjunctions | Verbs | Interrogatives | Word Order | Word Formation | Roots | Prefixes and Suffixes | Miscellaneous | Numbers | Word Studies | Miscellaneous Discussions | Basic Vocabulary | DICTIONARY | English Index | Vabungula in Cyrillic | Gospel of John | Gospel of Mark | Book of Revelation | Babel Text | Story of Peter Rabbit | Grammar Notes | Vocabulary | Three Little Pigs | Vocabulary | Jack and the Beanstalk | Three Bears | Old Woman and Pig | Frog Prince | Poppy Seed Cakes | Jolly Tailor | Little Prince | Boris Sergunenkov | Relativity | Jokes | Vabungula Main Page | Languages | Bill Price Home Page


Page last modified on April 19, 2018
Vabungula is an artificial language invented by Bill Price in 1965.
Vabungula co nûsk mugola famêlêtke onudž Bill Price larla alara idekuzorekol.
Copyright © 2018 by Bill Price
graphic.gif (2326 bytes)