hankcs / hanlp-lucene-plugin

HanLP中文分词Lucene插件,支持包括Solr在内的基于Lucene的系统
http://www.hankcs.com/nlp/segment/full-text-retrieval-solr-integrated-hanlp-chinese-word-segmentation.html
Apache License 2.0
296 stars 99 forks source link

文本中的换行(\n)很否自动去掉 #42

Open liuzhen6835 opened 5 years ago

liuzhen6835 commented 5 years ago

如果是一个字符串,可以提前把 \n去掉,但是在一个文本中,比如text中,那就需要把text全部读出来,去掉\n在进行分词,很消耗内存。在文本中一个词中间换行,应该很常见的。

hankcs commented 5 years ago

如果去掉\n,highlighter就会对不齐。