---
title: "Text分析方法-全文检索的基础"
author: "KJ"
date: "2009-10-01T12:29:44Z"
tags: []
slug: "text"
draft: false
lastmod: "2009-10-01T12:29:44Z"
id: 481131
url: "https://guidao.iteye.com/blog/481131"
---

Text分析方法-全文检索的基础

import java.util.regex.Matcher;
import java.util.regex.Pattern;
//这种方法可以分析出一组英文句子由那些组成，这个是全文检索的基础。
public class FindDemo {
 public static void main(String args) {
   Matcher m = Pattern.compile("\\w+").matcher(
       "Evening is full of the linnet's wings");
   while (m.find())
     System.out.println(m.group());
   int i = 0;
   while (m.find(i)) {
     System.out.print(m.group() + "分");
     i++;
   }

 }
}