/** * Return a String of length a minimum of totalChars characters by * padding the input String str at the right end with spaces. * If str is already longer * than totalChars, it is returned unchanged. */ public static String pad(String str, int totalChars) { return pad(str, totalChars, ' '); }
/** The cell String is the string representation of the object. * If padLeft is greater than 0, it is padded. Ditto right * */ private static String makeAsciiTableCell(Object obj, int padLeft, int padRight, boolean tsv) { String result = obj.toString(); if (padLeft > 0) { result = padLeft(result, padLeft); } if (padRight > 0) { result = pad(result, padRight); } if (tsv) { result = result + '\t'; } return result; }
result.append(StringUtils.pad("Total", labelSize)); for (int colTotal : colTotals) { result.append(StringUtils.padLeft(nf.format(colTotal), cellSize));
result.append(StringUtils.pad("Total", rowLabelSize)); for (double colTotal : colTotals) { result.append(StringUtils.padLeft(nf.format(colTotal), cellSize));
/** * Pads the toString value of the given Object. */ public static String pad(Object obj, int totalChars) { return pad(obj.toString(), totalChars); }
/** The cell String is the string representation of the object. * If padLeft is greater than 0, it is padded. Ditto right * */ private static String makeAsciiTableCell(Object obj, int padLeft, int padRight, boolean tsv) { String result = obj.toString(); if (padLeft > 0) { result = padLeft(result, padLeft); } if (padRight > 0) { result = pad(result, padRight); } if (tsv) { result = result + '\t'; } return result; }
for (Triple<F,L,Double> t : topFeatures) { String key = "(" + t.first + "," + t.second + ")"; sb.append(StringUtils.pad(key, maxLeng)); sb.append(" "); double cnt = t.third();
/** The cell String is the string representation of the object. * If padLeft is greater than 0, it is padded. Ditto right * */ private static String makeAsciiTableCell(Object obj, int padLeft, int padRight, boolean tsv) { String result = obj.toString(); if (padLeft > 0) { result = padLeft(result, padLeft); } if (padRight > 0) { result = pad(result, padRight); } if (tsv) { result = result + '\t'; } return result; }
header.append(StringUtils.pad(l, labelLength));
header.append(StringUtils.pad(l, labelLength));
totalWords++; if (word.length() == 0) continue; pw.print(StringUtils.pad(word + ':', 8)); if (tlp.isPunctuationWord(word)) { totalWords--;
for (Iterator<IntTaggedWord> it = lex.ruleIteratorByWord(wordIndex.addToIndex(args[i]), i - 3, null); it.hasNext(); ) { IntTaggedWord iTW = it.next(); System.out.println(StringUtils.pad(iTW, 24) + nf.format(lex.score(iTW, i - 3, wordIndex.get(iTW.word), null))); impos.add(tStr); } else { System.out.println(StringUtils.pad(iTW, 24) + nf.format(score));
for (Pair<Integer, Integer> p : bigColl) { String key = "(" + featureIndex.get(p.first) + "," + labelIndex.get(p.second) + ")"; sb.append(StringUtils.pad(key, maxLeng)); sb.append(" "); double cnt = weights[p.first][p.second];
/** * Return a String of length a minimum of totalChars characters by * padding the input String str at the right end with spaces. * If str is already longer * than totalChars, it is returned unchanged. */ public static String pad(String str, int totalChars) { return pad(str, totalChars, ' '); }
/** * Return a String of length a minimum of totalChars characters by * padding the input String str at the right end with spaces. * If str is already longer * than totalChars, it is returned unchanged. */ public static String pad(String str, int totalChars) { return pad(str, totalChars, ' '); }
/** * Pads the toString value of the given Object. */ public static String pad(Object obj, int totalChars) { return pad(obj.toString(), totalChars); }
/** * Pads the toString value of the given Object. */ public static String pad(Object obj, int totalChars) { return pad(obj.toString(), totalChars); }
/** * Pads the toString value of the given Object. */ public static String pad(Object obj, int totalChars) { return pad(obj.toString(), totalChars); }
/** * Pads the toString value of the given Object. */ public static String pad(Object obj, int totalChars) { return pad(obj.toString(), totalChars); }