Page 1 of 1

Convert Pascal to Alaska

Posted: Fri Feb 12, 2016 8:23 pm
by Eugene Lutsenko
Is there an automated way of converting the program in Pascal program in Alaska? Maybe someone could do this? We are talking about this program cloud triangulation points:
http://lc.kubagro.ru/Triangulation.rar

Re: Convert Pascal to Alaska

Posted: Sat Feb 13, 2016 8:22 am
by rdonnay
There is no automatic conversion but some languages are similar in ways to Xbase. I f you post some of the Pascal code maybe it could give me some ideas. I converted a PHP routine to Xbase.

Re: Convert Pascal to Alaska

Posted: Sat Feb 13, 2016 10:19 am
by Eugene Lutsenko
The fact that you could automatically convert PHP to the Xbase is very nice. And if there is the possibility contrary automatically convert Xbase to PHP? The fact is that for about half a year and is now conducted intensive development of on-line version Aidos system established on the basis of my local version.

Re: Convert Pascal to Alaska

Posted: Sun Feb 14, 2016 8:21 am
by rdonnay
The fact that you could automatically convert PHP to the Xbase is very nice.
It was not automatic.
I converted it line by line in a text editor. It was about 8 hours of work, including testing and certification.
The algorithm was a "Metaphone" algorithm used to search for possible terrorist names in U.S. Government databases when a person tried to open a bank account. It was a requirement under OFAC.

This little case study shows how similar languages can be when doing mathematical or string operations.

I attached both the PHP code and the PRG code.

Example (PHP)

Code: Select all

        case 'G':
          if (substr($this->original, $this->current + 1, 1) == 'H') {
            if (($this->current > 0)
                && !$this->IsVowel($this->original, $this->current - 1)) {
              $this->primary   .= "K";
              $this->secondary .= "K";
              $this->current += 2;
              break;
            }

            if ($this->current < 3) {
              // 'ghislane', 'ghiradelli'
              if ($this->current == 0) {
                if (substr($this->original, $this->current + 2, 1) == 'I') {
                  $this->primary   .= "J";
                  $this->secondary .= "J";
                } else {
                  $this->primary   .= "K";
                  $this->secondary .= "K";
                }
                $this->current += 2;
                break;
              }
            }
Example (PRG)

Code: Select all

      case cChar == 'G'
         if (substr(::original, ::current + 1, 1) == 'H')
            if ((::current > 1) ;
                  .AND. !::IsVowel(::original, ::current - 1))
               ::primary   += "K"
               ::secondary += "K"
               ::current += 2
               loop
            endif

            if (::current < 4)
               // 'ghislane', 'ghiradelli'
               if (::current == 1)
                  if (substr(::original, ::current + 2, 1) == 'I')
                     ::primary   += "J"
                     ::secondary += "J"
                  else
                     ::primary   += "K"
                     ::secondary += "K"
                  endif
                  ::current += 2
                  loop
               endif
            endif

Re: Convert Pascal to Alaska

Posted: Sun Feb 14, 2016 12:55 pm
by Eugene Lutsenko
Indeed, very similar. Maybe you, Roger, useful approach is based on information theory (developed by me) to identify words by entering them in the letters? This is a pattern recognition problem.

Lutsenko EV Identification of words in the letters included in them with the use of systemic-cognitive analysis / EV Lutsenko // multidisciplinary network electronic scientific journal of the Kuban State Agrarian University (Science magazine KubGAU) [electronic resource]. - Krasnodar: KubGAU, 2004. - №02 (004). S. 130 - 150. - IDA [article ID]: 0040402012. - Access: http://ej.kubagro.ru/2004/02/pdf/12.pdf, 1,312 upl

Луценко Е.В. Идентификация слов по входящим в них буквам с применением системно-когнитивного анализа / Е.В. Луценко // Политематический сетевой электронный научный журнал Кубанского государственного аграрного университета (Научный журнал КубГАУ) [Электронный ресурс]. – Краснодар: КубГАУ, 2004. – №02(004). С. 130 – 150. – IDA [article ID]: 0040402012. – Режим доступа: http://ej.kubagro.ru/2004/02/pdf/12.pdf, 1,312 у.п.л.

Aidos The system has built-in laboratory work 3.01, illustrating this approach (in the curriculum):
Image
It works well, even without taking into account the order of the letters in the word. This is due to the fact that different letters contain different amounts of information that this letter word is a particular word data

Re: Convert Pascal to Alaska

Posted: Fri Mar 04, 2016 8:29 am
by Eugene Lutsenko
In principle, I understand how to make the converter from Pascal to Alaska. He is to save a lot of time. But handwork is still needed. Without it not to manage.