Natural Language Processing With Python (2)

本篇博客详细介绍了如何从网络和磁盘获取原始文本,并通过Unicode编码进行内存处理。重点讲述了正则表达式的使用,包括搜索、查找、替换等功能。此外,还涉及了文本的规范化与分段,如词干提取、词形还原、句子和单词的分割等关键技术。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Chapter 3:

This chapter describes the skill to process raw text.

Some important point:

1. Access text from web and disk : api such as urlopen(), open(), read(), write() and some string operation . Also some tool to process text of html.

2. Text processing with Unicode : file/terminal(specific encoding) -> In-memory program including python processing(Unicode) -> file/terminal (specific encoding)

 

3. Regular expressions : re.search, find, findall, replace, splite and so on (remember to add r charater for raw text of regular expression).

Another api in nltk is nltk.regexp_tokenize() which is similar to findall.

Useful for finding word stems and searching tokenized text.

 

4. Normalizing Text and Segmentation : Stemmers, Lemmatization, Sentence Segmantation, Word Segmantation.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值