名词探疑3:I18N,L10N,A11Y

原文链接:http://www.cnblogs.com/linxi/archive/2009/07/03/1516313.html

看到I18N和A11Y是在Dojo上。一下子懵了。

GOOGLE START.

好吧,原来还有这种缩写喜好,取单词头尾,留中间字母个数。。。

I18N: Internationalization,去掉i,n,中间是18位。。

其他两个呢?能猜出来不?

L10N:Localization

A11Y:Accessibility

 

P.S. 感觉Dojo很清爽很小巧很挺人喜欢呀。选它还是Extjs呢,纠结。

转载于:https://www.cnblogs.com/linxi/archive/2009/07/03/1516313.html

展开阅读全文
博主设置当前文章不允许评论。

I18n

10-03

DescriptionnnInternationalization and localization are long words that are usually abbreviated as i18n and l10n. The numbers in between i-n and l-n refer to the number of letters that were omitted. It is a very powerful abbreviation method that can be naturally used for any words.nnA word may be abbreviated only when it has previously occurred in a given text. A word is abbreviated by omitting all the letters in the word except for the first and last letter and replacing omitted letters with a number of omitted letters.nnYour task is to write a program that expands such abbreviations in a given text whenever possible. Expansion is possible if it is valid and unambiguous.nnExpansion is valid if expanded word has previously occurred in the text and its abbreviated form corresponds to the abbreviation that is being expanded. Case is ignored for the purposes of validness. For example, expansion from i18n to internationalization is valid in this problem statement (even as internationalization was previously mentioned only with capital letter I). But expansion of p14n to parameterization is not valid since the word parameterization has never occurred before its abbreviation, and expansion of a11n to abbreviation is not valid, since it is not a correct abbreviation for the word abbreviation (correct one is a10n).nnExpansion is unambiguous if there is exactly one valid expansion for it. For example, expansion from l10n to localization is unambiguous in this problem statement, but expansion from p5m cannot be made unambiguously, since both problem and program are abbreviated to p5m.nnInputnnThe input file contains at most 1000 lines with at most 80 characters in each line. Each line contains one or more words separated by spaces and special symbols: ‘-’, ‘,’, ‘.’, ‘"’, ‘(’, ‘)’, ‘:’, ‘;’, ‘!’, ‘?’. There are no trailing spaces, but other separators are allowed at the end of line.nnWords may be either full or abbreviated. Full word consists of one to 32 Latin letters and may be written in one of three capitalization forms: all lowercase, First Capital Letter, or ALL CAPITAL LETTERS. Abbreviated word consists of a Latin letter, followed by a number from 2 to 30 (no leading zero), followed by a Latin letter. Abbreviated words also have three corresponding capitalization forms: all l7e, F3t C5l L4r, or ALL C5L L5S.nnOutputnnWrite to the output file original text with original separators while expanding abbreviated words into full words whenever possible (see problem statement). Capitalization of the expanded full word shall correspond to the capitalization of the abbreviation that is being expanded.nnInvalid or ambiguous abbreviations shall be left in the text as is (abbreviated). Note, that lines in the output file may be longer than 80 characters.nnSample InputnnThe first line of sample input.nThe s4d l2e of s4e i3t.nLone, lone, l4e...nS4e input last l4e!nSample OutputnnThe first line of sample input.nThe s4d line of sample input.nLone, lone, l4e...nSample input last l4e! 问答

没有更多推荐了,返回首页