代码来源:cc.mallet/malletTestSequencePrintingPipe.dictOfSize(...)private static Alphabet dictOfSize (int n) { Alphabet dict = new Alphabet (); for (int i = 0; i < n; i++) { dict.lookupIndex ("feature"+i); } return dict; } 代码来源:com.github.steveash.mallet/mallet...
we add 64 to the input integer, and cast it as a [char]. In case, the result is left on the pipeline and printing is implicit. Examples PSC:\Tools\Scripts\golfing> ([char[]](65..90)|%{.\alphabet-to-number.ps1 $_})-join',' 1,2,3,4,5,6,7,8,9,10,11,12,13,14,...