Skip to content

Commit

Permalink
预备开源
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Mar 26, 2015
1 parent bfab471 commit e82dd78
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/main/java/com/hankcs/hanlp/HanLP.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import com.hankcs.hanlp.corpus.dependency.CoNll.CoNLLSentence;
import com.hankcs.hanlp.dependency.MaxEntDependencyParser;
import com.hankcs.hanlp.dictionary.address.AddressDictionary;
import com.hankcs.hanlp.dictionary.py.Pinyin;
import com.hankcs.hanlp.dictionary.py.PinyinDictionary;
import com.hankcs.hanlp.dictionary.ts.SimplifiedChineseDictionary;
Expand All @@ -23,15 +22,13 @@
import com.hankcs.hanlp.seg.Segment;
import com.hankcs.hanlp.seg.Dijkstra.DijkstraSegment;
import com.hankcs.hanlp.seg.Viterbi.ViterbiSegment;
import com.hankcs.hanlp.seg.common.AddressTerm;
import com.hankcs.hanlp.seg.common.Term;
import com.hankcs.hanlp.summary.TextRankKeyword;
import com.hankcs.hanlp.summary.TextRankSentence;
import com.hankcs.hanlp.tokenizer.StandardTokenizer;

import java.io.File;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
Expand Down Expand Up @@ -137,11 +134,6 @@ public static final class Config
*/
public static String AddressExamplePath = "data/dictionary/address/example.txt";

/**
* 地址名后缀词典路径
*/
public static String AddressSuffixPath = "data/dictionary/address/suffix.txt";

/**
* 字符类型对应表
*/
Expand Down Expand Up @@ -213,9 +205,6 @@ public static final class Config
MaxEntModelPath = root + p.getProperty("MaxEntModelPath", MaxEntModelPath);
CRFSegmentModelPath = root + p.getProperty("CRFSegmentModelPath", CRFSegmentModelPath);
CRFDependencyModelPath = root + p.getProperty("CRFDependencyModelPath", CRFDependencyModelPath);
AddressRoleDictionaryPath = root + p.getProperty("AddressRoleDictionaryPath", AddressRoleDictionaryPath);
AddressExamplePath = root + p.getProperty("AddressExamplePath", AddressExamplePath);
AddressSuffixPath = root + p.getProperty("AddressSuffixPath", AddressSuffixPath);
}
catch (Exception e)
{
Expand Down Expand Up @@ -408,17 +397,6 @@ public static List<String> extractKeyword(String document, int size)
return TextRankKeyword.getKeywordList(document, size);
}

/**
* 地址提取接口
*
* @param text 文本
* @return 地址列表
*/
public static LinkedList<AddressTerm> extractAddress(String text)
{
return AddressDictionary.extractAddress(text.toCharArray());
}

/**
* 自动摘要
* @param document 目标文档
Expand Down

0 comments on commit e82dd78

Please sign in to comment.