Skip to content

Commit

Permalink
防御性代码
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Jul 4, 2015
1 parent 1c089dd commit 870b481
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/hankcs/hanlp/seg/Segment.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ protected void mergeNumberQuantifier(List<Vertex> termList, WordNet wordNetAll,
*/
public List<Term> seg(String text)
{
if (text == null || text.length() == 0) return Collections.emptyList();
char[] charArray = text.toCharArray();
if (HanLP.Config.Normalization)
{
Expand Down

0 comments on commit 870b481

Please sign in to comment.