Note1: Basic Text Processing
来源:互联网 发布:五线谱输入软件 编辑:程序博客网 时间:2024/05/18 00:26
Regular Expressions: Disjunctions
Online regular expression test
1. Letters inside square brackets []
Pattern
Matches
[wW]oodchuck
Woodchuck, woodchuck
[1234567890]
Any digit
2. Ranges [ A - Z ]
Pattern
Matches
[A-Z]
An upper case letter
Drenched Blossoms
[a-z]
A lower case letter
my beans were impatient
[0-9]
A single digit
Chapter 1: Down the Rabbit Hole
3. Negations [^Ss]
Carat means negation only when first in []
Pattern
Matches
[^A-Z]
Not an upper case letter
Oyfn pripetchik
[^Ss]
Neither ‘S’ nor ‘s’
I have no exquisite reason”
[^e^]
Neither e nor ^
Look here
a^b
The pattern a carat b
Look up a^bnow
4. The pipe | for disjunction
Pattern
Matches
groundhog|woodchuck
yours|mine
yours mine
a|b|c
= [abc]
[gG]roundhog|[Ww]oodchuck
Regular Expressions: ? * + .
Pattern
Matches
colou?r
Optional previous char
color colour
oo*h!
0 or more of previous char
oh!ooh! oooh! ooooh!
o+h!
1 or more of previous char
oh!ooh! oooh! ooooh!
baa+
baa baaa baaaa baaaaa
beg.n
begin begun begun beg3n
Anchors: ^ $
^ : start with
$: end with
Pattern
Matches
^[A-Z]
Palo Alto
^[^A-Za-z]
1 “Hello”
\.$
The end.
.$
The end? The end!
Two kinds of errors:
Type I: matching strings that we should not have matched False positives
Type II: not matching things that we should have matched False negatives
Two antagonistic efforts:
Increasing accuracy or precision (minimize false positives)
Increasing coverage or recall (minimizing false negatives)
Word Tokenization
- Note1: Basic Text Processing
- HTML--Note1--text
- 自然语言处理学习篇01——Basic Text Processing
- stanford第二课“文本处理基础(Basic Text Processing)”
- Stanford自然语言处理笔记1 -basic text processing
- 斯坦福大学自然语言处理第二课“文本处理基础(Basic Text Processing)”
- standford自然语言处理第二课“文本处理基础(Basic Text Processing)”
- BASIC IMAGE PROCESSING TUTORIAL
- Tensorflow Image Processing Basic
- note1
- note1
- note1
- note1
- Note1
- note1
- Text Processing in Python
- Text Processing in Python
- Text Processing and Manipulation
- 【面试真题】华为2013至2015最全-嵌入式软件(附答案)
- WebView使用中js调用java代码时targetSdkVersion大于17时,无法调用成功
- Codeforces Round #105 (Div. 2) C. Terse princess
- window下mysql配置MASTER/SLAVE模式
- noip1997 代数表达式 (模拟)
- Note1: Basic Text Processing
- SendFax过程分析
- NOIP2014 飞扬的小鸟 题解
- HDU 1087 Super Jumping! Jumping! Jumping!
- Error:duplicate files during packaging of APK /Users/text01/Desktop/Android错误信息的解决办法
- onNewIntent调用时机
- m个数取n个的排列数 Cmn
- mysql5.X 增加新用户
- HDU 4287 Intelligent IME (map水题或字典树+DFS)