Re: Translate LyX document to another language

2023-02-21 Thread Dr Eberhard W Lisse
It's next to impossible, like trying to dictate into LyX.

Never mind that automatic translations, while more or less reasonable to
good, are never perfect.  There is just no substitute for professional
translation.

el

On 21/02/2023 22:49, Paul Smith wrote:
> Thanks, Dr Eberhard W Lisse. The idea is to get a LyX file as the
> result, but I understand it is something very difficult to achieve.
> 
> Paul
[...]

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Paul Smith
Thanks, Dr Eberhard W Lisse. The idea is to get a LyX file as the
result, but I understand it is something very difficult to achieve.

Paul


On Tue, Feb 21, 2023 at 8:19 PM Dr Eberhard W Lisse  wrote:
>
> And the result must be a LyX file? I doubt that this is possible.
>
> You can always export to text and have that translated.
>
> el
>
>
>
> On 21/02/2023 11:01, Paul Smith wrote:
> > Dear All,
> >
> > Is there some way of automatically translating a LyX document, say,
> > from Spanish to English?
> >
> > I have come across GoogleTranslate4LyX:
> >
> > https://wiki.lyx.org/Tools/GoogleTranslate4LyX
> >
> > However, since an intermediate step involves conversion to HTML files,
> > I am a bit skeptical about the quality of the result.
> >
> > Thanks in advance,
> >
> > Paul
>
>
> --
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Dr Eberhard W Lisse
And the result must be a LyX file? I doubt that this is possible.

You can always export to text and have that translated.

el



On 21/02/2023 11:01, Paul Smith wrote:
> Dear All,
> 
> Is there some way of automatically translating a LyX document, say,
> from Spanish to English?
> 
> I have come across GoogleTranslate4LyX:
> 
> https://wiki.lyx.org/Tools/GoogleTranslate4LyX
> 
> However, since an intermediate step involves conversion to HTML files,
> I am a bit skeptical about the quality of the result.
> 
> Thanks in advance,
> 
> Paul


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Paul Smith
On Tue, Feb 21, 2023 at 12:53 PM Pavel Sanda  wrote:
> >
> > Is there some way of automatically translating a LyX document, say,
> > from Spanish to English?
>
> Not easy for the whole document. But if you are coder I can see that within
> couple hours you might come up with a script which does something along these 
> lines:
> 1) copy paragraph which is selected in lyx into text file
> 2) seend it to DeepL API via curl
> 3) receive the response
> 4) paste it back into document
>
> Special formatting, equations/ images etc will be gone in this transformation.
>
> But having in LyX some better handling of such exchange for external services
> would be useful. From time to time I am checking grammarly for evolution of 
> their
> API interface, which would be closer to C++/Qt world so we could directly use 
> it...

Thanks, Pavel, for the ideas you have suggested. As soon as I have
some spare time, I will try to implement them in Python.

Paul
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Pavel Sanda
On Tue, Feb 21, 2023 at 09:01:23AM +, Paul Smith wrote:
> Dear All,
> 
> Is there some way of automatically translating a LyX document, say,
> from Spanish to English?

Not easy for the whole document. But if you are coder I can see that within
couple hours you might come up with a script which does something along these 
lines:
1) copy paragraph which is selected in lyx into text file
2) seend it to DeepL API via curl
3) receive the response
4) paste it back into document

Special formatting, equations/ images etc will be gone in this transformation.

But having in LyX some better handling of such exchange for external services
would be useful. From time to time I am checking grammarly for evolution of 
their
API interface, which would be closer to C++/Qt world so we could directly use 
it...

Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Paul Smith
On Tue, Feb 21, 2023 at 9:05 AM Lorenzo Bertini
 wrote:
>
> > Is there some way of automatically translating a LyX document, say,
> > from Spanish to English?
> >
> > I have come across GoogleTranslate4LyX:
> >
> > https://wiki.lyx.org/Tools/GoogleTranslate4LyX
> >
> > However, since an intermediate step involves conversion to HTML files,
> > I am a bit skeptical about the quality of the result.
>
> I'm not aware of any tool specifically made for this purpose, but a .lyx
> file is in plain text, so if you can get any translator that works with
> that and can skip LyX's keywords it should work fine.

Thanks, Lorenzo. The difficulty is really to skip LyX's keywords!

Paul
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Translate LyX document to another language

2023-02-21 Thread Lorenzo Bertini

Il 21/02/23 10:01, Paul Smith ha scritto:

Dear All,

Is there some way of automatically translating a LyX document, say,
from Spanish to English?

I have come across GoogleTranslate4LyX:

https://wiki.lyx.org/Tools/GoogleTranslate4LyX

However, since an intermediate step involves conversion to HTML files,
I am a bit skeptical about the quality of the result.

Thanks in advance,

Paul


I'm not aware of any tool specifically made for this purpose, but a .lyx 
file is in plain text, so if you can get any translator that works with 
that and can skip LyX's keywords it should work fine.


--
lorenzo
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Translate LyX document to another language

2023-02-21 Thread Paul Smith
Dear All,

Is there some way of automatically translating a LyX document, say,
from Spanish to English?

I have come across GoogleTranslate4LyX:

https://wiki.lyx.org/Tools/GoogleTranslate4LyX

However, since an intermediate step involves conversion to HTML files,
I am a bit skeptical about the quality of the result.

Thanks in advance,

Paul
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users