From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Emacs as a translator's tool Date: Fri, 18 Sep 2020 16:39:38 -0700 Message-ID: <87tuvuk62t.fsf@ericabrahamsen.net> References: <871rn35lqc.fsf@mbork.pl> <87zh9r45ad.fsf@mbork.pl> <87h7vz2m5g.fsf@ebih.ebihd> <87zh9qr67n.fsf@ericabrahamsen.net> <3DBA2692-28A0-4AC3-B884-78763A9C7B16@traduction-libre.org> <87tuzyr474.fsf@ericabrahamsen.net> <87h7rwtov7.fsf@ericabrahamsen.net> <87d02ktmpr.fsf@ericabrahamsen.net> <875z8c8din.fsf@ericabrahamsen.net> <87d02inbrn.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32944"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:SvryxjOmJqkLOCF5HX0COXX5EsY= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 01:40:29 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJPzQ-0008Tu-SG for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 01:40:28 +0200 Original-Received: from localhost ([::1]:40102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJPzP-000604-VP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Sep 2020 19:40:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJPyp-0005zv-O3 for help-gnu-emacs@gnu.org; Fri, 18 Sep 2020 19:39:52 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:58180 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJPyl-0002xJ-9h for help-gnu-emacs@gnu.org; Fri, 18 Sep 2020 19:39:48 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kJPyh-0007mW-3A for help-gnu-emacs@gnu.org; Sat, 19 Sep 2020 01:39:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 19:39:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124104 Archived-At: Arthur Miller writes: > Arthur Miller writes: > >>> it expects three (at least) top-level Org headings, representing the >>> source text, translated text, and glossary. So you'd move your existing >>> translation under a new top-level heading, put the original source text >>> under a new top-level heading, and add a third top-level heading for the >>> glossary. > Ok, checked! > >>> If you're doing a book, I would then set `ogt-segmentation-strategy' to >>> the symbol 'paragraph. Then turn on the minor mode, which should segment >>> the source text. I've updated the library to also segment the >>> translation text, which will be important to you since you've already >>> done so much of it. > I have done it, and it did the segmenting for the source seemingly > pretty well, but it didn't really understand the translation, maybe > it is confused because I used org headings for the chapters and pages, > so the translation does not correspond 1:1 to the source? That could be, segmentation isn't super smart. > For today I don't have more time, I'll see tomorrow if I can remove > headings and see if it works better. Rather than do that, I'd play with deleting/adding segmentation characters. Like I said it's not smart, and once it's done the segmentation it won't touch it again, so you could just take out "extra" segmentation characters so the headings don't look like separate segments. >>> I'm sort of surprised that segmentation didn't error out before -- if >>> the code can't find a source tree, it should indicate an error. > It didn't error; it just said 0% done :-). > > Thanks for the help, I was able to move around as you described and it > worked moslty as you advertise, seems like. If I did it from the start I > guess the tool would work much better for me :-). Probably! I haven't tried turning it on halfway through. That wasn't going to be a priority, but if you're the one testing it, those are the bugs I'll fix :)