Skip to content

Commit

Permalink
针对纯英文文本的分词器
Browse files Browse the repository at this point in the history
  • Loading branch information
ysc committed May 18, 2015
1 parent 33d2549 commit d060aae
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -34,8 +34,8 @@
* 针对纯英文文本的分词器
* @author 杨尚川
*/
public class PureEnglishSegmentation implements Segmentation {
private static final Logger LOGGER = LoggerFactory.getLogger(PureEnglishSegmentation.class);
public class PureEnglish implements Segmentation {
private static final Logger LOGGER = LoggerFactory.getLogger(PureEnglish.class);
private static final Pattern NUMBER = Pattern.compile("\\d+");
private static final Pattern UNICODE = Pattern.compile("[uU][0-9a-fA-F]{4}");

Expand Down Expand Up @@ -153,7 +153,7 @@ private static boolean isNumeric(String string) {
}

public static void main(String[] args) {
Segmentation segmentation = new PureEnglishSegmentation();
Segmentation segmentation = new PureEnglish();
System.out.println(segmentation.seg("Your function may also be added permanently to Hive, however this requires a small modification to a Hive Java file and then rebuilding Hive."));
}
}

0 comments on commit d060aae

Please sign in to comment.