de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.multi.ru.quote.YearsRange.stringToInt()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(123)

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

YearsRange.stringToInt介绍

[英]Converts string to integer, if there is any problem then return -1.
[中]将字符串转换为整数,如果有任何问题,则返回-1。

代码示例

代码示例来源:origin: dkpro/dkpro-jwktl

/** Parses source text (e.g. "1882" or "08-07-2011" or "06.05.2006") 
 * and extracts four digits.
 * 
 * @return -1 If text was not parsed successfully
 */
private int extractFourDigits (String page_title, String text) {
  
  int i = -1;
  
  Matcher m = pattern_contains_4_year.matcher(text);
  if(m.find()) {
    text = m.group();
    i = stringToInt(page_title, text);
  }
  return i;
}

代码示例来源:origin: de.tudarmstadt.ukp.jwktl/jwktl

/** Parses source text (e.g. "1882" or "08-07-2011" or "06.05.2006") 
 * and extracts four digits.
 * 
 * @return -1 If text was not parsed successfully
 */
private int extractFourDigits (String page_title, String text) {
  
  int i = -1;
  
  Matcher m = pattern_contains_4_year.matcher(text);
  if(m.find()) {
    text = m.group();
    i = stringToInt(page_title, text);
  }
  return i;
}

代码示例来源:origin: de.tudarmstadt.ukp.jwktl/jwktl

year_from = stringToInt(page_title, text);
  year_to = year_from;
} else {
    year_from = stringToInt(page_title, str_from);
    year_to = year_from;
    year_to = stringToInt(page_title, str_to);

代码示例来源:origin: dkpro/dkpro-jwktl

year_from = stringToInt(page_title, text);
  year_to = year_from;
} else {
    year_from = stringToInt(page_title, str_from);
    year_to = year_from;
    year_to = stringToInt(page_title, str_to);

相关文章