From: Manabu O. <man...@or...> - 2016-01-26 20:18:12
|
Hi Yoshito-san, ? Let’s talk about the example below; this is an example of a label in a chart: ? 当会社のコンセプト (concept of this company) ? ? In this example, I like to cut after “当会社の” instead of after “当会社” so that it will show : 当会社の コンセプト ? Instead of this: 当会社 のコンセプト ? is this possible with the combination of word break and line break? Isn’t word break not to break “当会社“ into something like “当会“ and “社”? ? ? Thanks, Manabu ? From: Yoshito Umaoka [mailto:yos...@us...] Sent: Tuesday, January 26, 2016 8:15 AM To: ICU support mailing list <icu...@li...> Cc: Steven R Loomis <srl...@us...> Subject: Re: [icu-support] a question about ICU Segments example ? Manabu Okuhara <HYPERLINK "mailto:man...@or..."man...@or...> wrote on 01/20/2016 02:37:09 PM: > From: Manabu Okuhara <HYPERLINK "mailto:man...@or..."man...@or...> > To: ICU support mailing list <HYPERLINK "mailto:icu...@li..."icu...@li...> > Cc: Steven R Loomis/Cupertino/IBM@IBMUS > Date: 01/20/2016 02:47 PM > Subject: Re: [icu-support] a question about ICU Segments example > > hi there, > > I have looked at the slide. > The example string does not have any meaning as a sentence, so I am > not able to say any of strict, normal or loose is good. > I have shared a logic that may work in many cases below in my > original email, but there are always exceptions. --- "It could be as simple as breaking before Kanji and before Katakana as well as breaking after punctuations like “、” and “。”; it may be a good start but may need more thoughts." --- Is this what you expect? I guess you're looking at different break type. ICU "line" break for Japanese text is based on JIS 'Kinsoku' rule. It prohibit a line starts with a punctuation character, but it does not prevent a word across two lines. I guess what you want is a combination of "word" break and "line" break. It looks you don't want to wrap a line in a middle of a word (although I don't think such rule is commonly used for Japanese text). If so, you could use two break iterator instances - one for word break, and another for line break, then wrap a line at a position which is both word break and line break. -Yoshito |