Convert Pascal to Alaska

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Convert Pascal to Alaska

#1 Post 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

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Convert Pascal to Alaska

#2 Post 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.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Convert Pascal to Alaska

#3 Post 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.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Convert Pascal to Alaska

#4 Post 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
Attachments
metaphon.zip
(10.85 KiB) Downloaded 562 times
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Convert Pascal to Alaska

#5 Post 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

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Convert Pascal to Alaska

#6 Post 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.

Post Reply