all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: chinese word mode
Date: Sat, 09 Nov 2013 10:51:39 +0800	[thread overview]
Message-ID: <87vc022sp0.fsf@ericabrahamsen.net> (raw)
In-Reply-To: CAAF+z6GA0H5QvD2j0OUFOY1WfshE4XvaPn92VQ9D5V4tzU9L5Q@mail.gmail.com

Xue Fuqiao <xfq.free@gmail.com> writes:

> Looks interesting, although sometimes it can be ambiguous.
>
> For example:
>
> * `化妆和服装' can split into either `化妆 和 服装' or `化妆 和服 装';
> * In `这个门把手坏了', `把手' is a word, but in `请把手拿开', `把手' is not a word;
> * In `将军任命了一名中将', `中将' is a word, but in `产量三年中将增长两倍', `中将' isn't a
> word any more.
>
> How do you solve this problem?

Short answer: you don't! When I first started looking at this issue, I
was considering all kinds of complicated solutions involving external
libraries by people smarter than me, who presumably had a system for
syntactical analysis.

Then someone pointed me at thai-word.el, which takes the "dumb"
approach -- scanning forward for the longest string in a word list --
and I realized if I was going to get anything actually completed, this
would have to do.

Mainly the point is making navigation through Chinese prose a little
less annoying, not producing a "correct" solution. As you note, there
will always be ambiguities that can't be resolved.

Eric




  reply	other threads:[~2013-11-09  2:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  9:11 chinese word mode Eric Abrahamsen
2013-11-06  6:59 ` Eric Abrahamsen
2013-11-06 13:36   ` Stefan Monnier
2013-11-07 12:15     ` Kenichi Handa
2013-11-08  3:36       ` Eric Abrahamsen
2013-11-08 23:03         ` Xue Fuqiao
2013-11-09  2:51           ` Eric Abrahamsen [this message]
2013-11-06 15:37   ` William Xu
2013-11-07  7:13     ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vc022sp0.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.