weka.core.Utils.unquote()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中weka.core.Utils.unquote()方法的一些代码示例,展示了Utils.unquote()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.unquote()方法的具体详情如下:
包路径:weka.core.Utils
类名称:Utils
方法名:unquote

Utils.unquote介绍

[英]unquotes are previously quoted string (but only if necessary), i.e., it removes the single quotes around it. Inverse to quote(String).
[中]unquotes是以前用引号括起来的字符串(但只有在必要时),也就是说,它删除了它周围的单引号。反引号(字符串)。

代码示例

代码示例来源:origin: Waikato/weka-trunk

} else if (m_structure.attribute(i).isString()) {
 vals[i] = 0;
 m_structure.attribute(i).setStringValue(Utils.unquote(val.toString()));
} else if (m_structure.attribute(i).isDate()) {
 String format = m_structure.attribute(i).getDateFormat();
 SimpleDateFormat sdf = new SimpleDateFormat(format);
 String dateVal = Utils.unquote(val.toString());
 try {
  vals[i] = sdf.parse(dateVal).getTime();
  m_structure.attribute(i).indexOfValue(Utils.unquote(val.toString()));
 if (index < 0) {
  throw new IOException("Read unknown nominal value " + val.toString()

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

} else if (m_structure.attribute(i).isString()) {
 vals[i] = 0;
 m_structure.attribute(i).setStringValue(Utils.unquote(val.toString()));
} else if (m_structure.attribute(i).isDate()) {
 String format = m_structure.attribute(i).getDateFormat();
 SimpleDateFormat sdf = new SimpleDateFormat(format);
 String dateVal = Utils.unquote(val.toString());
 try {
  vals[i] = sdf.parse(dateVal).getTime();
  m_structure.attribute(i).indexOfValue(Utils.unquote(val.toString()));
 if (index < 0) {
  throw new IOException("Read unknown nominal value " + val.toString()

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

setRelationName(Utils.unquote(tmpStr));
} else {
 setRelationName("");

代码示例来源:origin: Waikato/weka-trunk

setRelationName(Utils.unquote(tmpStr));
} else {
 setRelationName("");

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

output = Utils.quote(input);
assertTrue("Empty string quoted", output.startsWith("'") && output.endsWith("'"));
assertTrue("Empty string restored", input.equals(Utils.unquote(output)));
assertTrue("Blank restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));

代码示例来源:origin: Waikato/weka-trunk

output = Utils.quote(input);
assertTrue("Empty string quoted", output.startsWith("'") && output.endsWith("'"));
assertTrue("Empty string restored", input.equals(Utils.unquote(output)));
assertTrue("Blank restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));
assertTrue(">" + input + "< restored", input.equals(Utils.unquote(output)));

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

vals[index] = data.attribute(index).indexOfValue(value);
if ((vals[index] == -1) && value.startsWith("'") && value.endsWith("'"))
 vals[index] = data.attribute(index).indexOfValue(Utils.unquote(value));
 vals[index] = data.attribute(index).indexOfValue(Utils.unbackQuoteChars(Utils.unquote(value)));
if (vals[index] == -1) {
 System.err.println("Unknown label '" + value + "' for attribute #" + (index+1) + "!");

代码示例来源:origin: Waikato/weka-trunk

vals[index] = data.attribute(index).indexOfValue(value);
if ((vals[index] == -1) && value.startsWith("'") && value.endsWith("'"))
 vals[index] = data.attribute(index).indexOfValue(Utils.unquote(value));
 vals[index] = data.attribute(index).indexOfValue(Utils.unbackQuoteChars(Utils.unquote(value)));
if (vals[index] == -1) {
 System.err.println("Unknown label '" + value + "' for attribute #" + (index+1) + "!");

相关文章