Page 1 of 1
Software implementation of on-line translation
Posted: Fri Dec 08, 2017 10:58 am
by Eugene Lutsenko
I am very interested in the ability to transfer strings from one language to another, using a function. As a parameter to ask her, for example, text in Russian and the option for what language to translate and it returns the translation for that language. Maybe this function will use the database. Maybe she will access on-line translator. The second seems better. Does anyone know how it to do? I want to make a multilingual version of the system Eidos. Now used in many countries, and I want to make it more comfortable:

Need a translator from Russian into other languages from the command line or address line, so I can use it right out of the system Eidos
Re: Software implementation of on-line translation
Posted: Fri Dec 08, 2017 11:55 pm
by c-tec
Re: Software implementation of on-line translation
Posted: Sat Dec 09, 2017 4:30 am
by Eugene Lutsenko
Re: Software implementation of on-line translation
Posted: Fri Dec 29, 2017 11:49 pm
by Eugene Lutsenko
Everything turned out perfectly using UNIX.
Trans.bat:
c:\Aidos-X\cygwin\bin\bash.exe -l -i c:\Aidos-X\cygwin\bin\trans -b ru:en -i c:/aidos-x/inptrans.txt -o c:/aidos-x/output.txt
The path is made for my system. I use ready for cygwin portable (does not require installation). so in the new year the system interface ides can easily be configured for almost any of the 184 languages supported by Google translator.
Re: Software implementation of on-line translation
Posted: Wed Jan 03, 2018 11:33 am
by Eugene Lutsenko
22.11.2017 Fixed inaccuracy xls->dbf Converter, which is very rarely resulted in an error convert (when I met the Latin names of the fields that match the first 10 characters)
22.11.2017 Corrected the inaccuracy in the mode 2.3.2.4, which resulted in an error, because it expanded the parameters of dialogue in a mode 2.3.2.2.
21.12.2017 Improved mode 6.9. When the number of runs of Eidos in the world exceeded 7000 , then stopped working Google services to display maps with the places of the runs. Therefore, in this mode the display on the Yandex-map unique IP addresses. Additionally, automated selection of ranges of dates: day, month, 3 months and six months.
21.12.2017 mode 4.8. Ask-image analysis, implemented the integrated criterion of finding the image boundary, comprising three additive private criterion, the weight in the integral criteria is specified in the dialogue.:
1. The degree of difference of the pixel from the environment.
2. The distance from the center of gravity of the image.
3. Distance of neighbouring points of the contour from each other.
21.12.2017 Started the development mode support multilanguage interface system Eidos. Still made a lot of small improvements.
03.01.2018 Developed infrastructure mode support multilanguage interface system Eidos. Now in 1.4 mode, you can specify one of the 184 languages, some of which are supported by online Google translator. Read more about this mode, it is possible to read in Help on it. It should be noted that this mode is still a lot of work. Many of the text elements of the UI is displayed only in Russian. In fact, since the beginning of 2018 begins testing and refinement of the regime. This mode uses a UNIX portable version is now included in the installation package of the system "Eidos". During the development of this mode of great help in resolving issues transcoding of the text elements of the interface and the implementation of calls to the online Google translator was provided by Dima Ermakov. Nectariy languages may not be supported by Google translator. After some time they will all be identified and removed from the mode multilanguage support.
03.01.2018 When you run the load module updates _START_AIDOS.exe calculates the checksum of the executable module in "Aidos": _aidos-x.exe. If it coincides with the counted when compiling, any messages to the user will not be granted if it does not match, then the user gets a message about unauthorized modifications to an executable module in "Eidos" (most likely viruses) and that its functioning is not guaranteed.
Software implementation here:
http://lc.kubagro.ru/_AIDOS-X.txt
Search "nf1_4("
Thank you all !!!
Re: Software implementation of on-line translation
Posted: Mon Jan 08, 2018 9:49 pm
by Eugene Lutsenko
Significantly improved algorithm and its software implementation-mode support multilanguage (1.4.)
Re: Software implementation of on-line translation
Posted: Tue Jan 09, 2018 11:37 am
by Eugene Lutsenko
While I have temporarily disabled the maintenance mode multilingual. The reason is that when referring to him disturbed environment (open databases and index arrays). I tried to keep the medium at the start of the function "N L(" and restore when you exit it, but it did not. Can anyone tell me how to do it
Code: Select all
**********************************************************************************************************************************
******** Если текущим задан русский язык, то найти элемент диалога в русской языковой базе:
******** - если он найден, то просто вернуть его:
******** - если он не найден, то занести его в русскую языковую базу и вернуть его.
********
******** Если текущим задан не русский язык вернуть перевод элемента диалога на текущий язык:
******** - если элемент диалога есть в языковой базе данных текущего языка, то взять из нее;
******** - если элемента диалога нет в языковой базе данных текущего языка, то сдедать перевод и добавить в нее, и вернуть перевод
**********************************************************************************************************************************
FUNCTION L(mParInp)
RETURN mParInp
aLstr := DC_DataSave() // Сохранение вычислительной среды (открытые и текущие БД и индексы) в памяти
* DC_DataRest( aLstr ) // Восстановление вычислительной среды (открытые и текущие БД и индексы)
mISO639_1 = SUBSTR(FileStr('Language.txt'),1,2)
mNameLangDB = 'Lang_'+mISO639_1
IF .NOT. FILE('Lang_ru.dbf') // Перенести в начало системы
aStructure := { { "NumPP" , "N", 6, 0 }, ;
{ "TextOrig" , "C", 255, 0 }, ;
{ "TextTransl" , "C", 255, 0 }, ;
{ "NumbUses" , "N", 15, 0 }, ;
{ "Date" , "C", 10, 0 }, ;
{ "Time" , "C", 8, 0 } }
DbCreate( 'Lang_ru.dbf', aStructure )
CLOSE ALL
USE Lang_ru EXCLUSIVE NEW
INDEX ON TextOrig TO Lang_ru
ENDIF
***** Если текстовый элемент уже есть в русской языковой базе,
***** то просто увеличить счетчик его использований,
***** а если его нет, то добавить
CLOSE ALL
USE Lang_ru INDEX Lang_ru EXCLUSIVE NEW
mParOut = ALLTRIM(mParInp)
* SELECT Lang_ru;SET ORDER TO 1;T=DBSEEK(mParInp)
SELECT Lang_ru;INDEX ON TextOrig TO Lang_ru;T=DBSEEK(mParInp)
IF T
SET ORDER TO
mNumbUses = NumbUses+1
REPLACE NUMBUSES WITH mNumbUses // Число использований данного элемента интерфейса
ELSE // Добавить сообщение в русскую языковую базу
SET ORDER TO
APPEND BLANK // Накопление информации об использованных текстовых элементах интерфейса
REPLACE NumPP WITH RECNO()
REPLACE TEXTORIG WITH ALLTRIM(mParInp)
REPLACE TEXTTRANSL WITH ALLTRIM(mParInp)
REPLACE NUMBUSES WITH 1 // Число использований элемента интерфейса
REPLACE Date WITH DTOC(DATE())
REPLACE Time WITH TIME()
ENDIF
IF mISO639_1 <> 'Ru' // Текущим задан не русский русский язык
IF .NOT. FILE(mNameLangDB+'.dbf') // Перенести в начало системы
aStructure := { { "NumPP" , "N", 6, 0 }, ;
{ "TextOrig" , "C", 255, 0 }, ;
{ "TextTransl" , "C", 255, 0 }, ;
{ "NumbUses" , "N", 15, 0 }, ;
{ "Date" , "C", 10, 0 }, ;
{ "Time" , "C", 8, 0 } }
DbCreate((mNameLangDB), aStructure )
CLOSE ALL
USE (mNameLangDB) EXCLUSIVE NEW
INDEX ON TextOrig TO (mNameLangDB)
ENDIF
CLOSE ALL
USE (mNameLangDB) INDEX (mNameLangDB) EXCLUSIVE NEW
IF RECCOUNT() > 1 // Если языковая база не пустая
* SELECT (mNameLangDB);SET ORDER TO 1;T=DBSEEK(mParInp)
SELECT (mNameLangDB);INDEX ON TextOrig TO (mNameLangDB);T=DBSEEK(mParInp)
IF T
mParOut = ALLTRIM(TextTransl) // Если перевод найден, то возвратить его
ENDIF
ENDIF
ENDIF
* aLstr := DC_DataSave() // Сохранение вычислительной среды (открытые и текущие БД и индексы) в памяти
DC_DataRest( aLstr ) // Восстановление вычислительной среды (открытые и текущие БД и индексы)
RETURN mParOut
[/size]
Re: Software implementation of on-line translation
Posted: Tue Jan 09, 2018 10:00 pm
by Eugene Lutsenko
Probably will make this feature generally without recourse to databases, fully on the arrays. At system startup, will these arrays be formed. When you exit the system, these arrays will be used to adjust the language of databases. Mode multilingual support also going to use them for the formation of linguistic databases. In General, this will allow you to resolve a problematic situation
Re: Software implementation of on-line translation
Posted: Fri Jan 12, 2018 8:56 am
by Eugene Lutsenko
12.01.2018 mode 1.4. Support multilingual significantly increased speed of operation. In addition, he implemented almost without using the database, whereby it can be used in all functions of the system "Eidos".
Re: Software implementation of on-line translation
Posted: Fri May 25, 2018 2:08 pm
by Eugene Lutsenko
!