NLP里面的一些基本概念

1,corpus 语料库

a computer-readable collection of text or speech 

2,utterance 发音

比如下面一句话:I do uh main- mainly business data processing 

uh 是 fillers填充词Words like uh and um are called fillers or filled pauses )。The broken-off word main- is fragment called a fragment 

3,Types are the number of distinct words in a corpus  

给你一句话,这句话里面有多少个单词呢? 标点符号算不算单词?有相同lemma的单词算不算重复的单词?比如“he is a boy and you are a girl”,这句话中 “is”和 "are"的lemma 都是 be。另外,这句话中 "a" 出现了两次。那这句话有多少个单词?这就要看具体的统计单词个数的方式了。

Tokens are the total number N of running words. 

4,Morphemes 

A Morpheme is the smallest division of text that has meaning. Prefxes and suffxes are examples of morphemes 

These are the smallest units of a word that is meaningful. 比如说:“bounded”,"bound"就是一个 morpheme,而Morphemes而包含了后缀 ed

5,Lemma(词根) 和 Wordform(词形)

Cat 和 cats 属于相同的词根,但是却是不同的词形。

Lemma 和 stem 有着相似的意思:

6,stem 

Stemming is the process of finding the word stem of a word 。比如,walking 、walked、walks 有着相同的stem,即: walk

与stem相关的一个概念叫做 lemmatization,它用来确定一个词的基本形式,这个过程叫做lemma。比如,单词operating,它的stem是 ope,它的lemma是operate 

Lemmatization is a more refined process than stemming and uses vocabulary and morphological techniques to find a lemma. This can result in more precise analysis in some situations 。

The lemmatization process determines the lemma of a word. A lemma can be thought of as the dictionary form of a word

(Lemmatization 要比 stemming 复杂,但是它们都是为了寻找 单词的 “根”)。但是Lemmatization 更复杂,它用到了一些词义分析(finding the morphological or vocabulary meaning of a token)

Stemming and lemmatization: These processes will alter the words to get to their "roots".  Similar to stemming is Lemmatization. This is the process of fnding its lemma, its form as found in a dictionary.  

Stemming is frequently viewed as a more primitive technique, where the attempt to get to the "root" of a word involves cutting off parts of the beginning and/or ending of a token. 

 Lemmatization can be thought of as a more sophisticated approach where effort is devoted to finding the morphological or vocabulary meaning of a token。

比如说 having 的 stem 是 hav,但是它的 lemma 是have

再比如说 was 和 been 有着不同的 stem,但是有着相同的 lemma : be

7,affix 词缀 (prefix 和 suffxes)

比如说:一个单词的 现在进行时,要加ing,那么 ing 就是一个后缀。

This precedes or follows the root of a word . 比如说,ation 就是 单词graduation的后缀。

8,tokenization (分词)

就是把一篇文章拆分成一个个的单词。The process of breaking text apart is called tokenization 

9,Delimiters (分隔符)

要把一个句子 分割成一个个的单词,就需要分隔符,常用的分隔符有:空格、tab键(\t);还有 逗号、句号……这个要视具体的处理任务而定。

The elements of the text that determine where elements should be split are called Delimiters 。

10,categorization (归类)

把一篇文本,提取中心词,进行归类,来说明这篇文章讲了什么东西。比如写了一篇blog,需要将这篇blog的个人分类,方便以后查找。

This is the process of assigning some text element into one of the several possible groups.  

11,stopwords

某些NLP任务需要将一些常出现的“无意义”的词去掉,比如:统计一篇文章频率最高的100个词,可能会有大量的“is”、"a"、"the" 这类词,它们就是 stopwords。

Commonly used words might not be important for some NLP tasks such as general searches. These common words are called stopwords 

由于大部分文本都会包含 stopwords,因此文本分类时,最好去掉stopwords。关于stopwords的一篇参考文章

12,Normalization (归一化)

将一系列的单词 转化成 某种 统一 的形式,比如:将一句话的各个单词中,有大写、有小写,将之统一转成 小写。再比如,一句话中,有些单词是 缩写词,将之统一转换成全名。

Normalization is a process that converts a list of words to a more uniform sequence.

Normalization operations can include the following:(常用的归一化操作有如下几种)

converting characters to lowercase(大小写转换),expanding abbreviation(缩略词变成全名), removing stopwords(移除一些常见的“虚词”), stemming, and lemmatization.(词干或者词根提取) 


 参考资料

《JAVA自然语言处理》Natural Language processing with java

 

原文:http://www.cnblogs.com/hapjin/p/7581335.html 

转载于:https://www.cnblogs.com/hapjin/p/7581335.html

<think>嗯,用户想写一篇关于自然语言处理50个基本概念的优快云博客。首先,我需要确定用户的需求是什么。他们可能希望这篇博文结构清晰,内容全面,适合不同层次的读者,尤其是初学者。用户可能还希望博文能够吸引更多的读者,增加互动和关注。 接下来,我得考虑如何组织这50个概念。直接列出来可能太枯燥,所以应该分门别类,比如基础概念、核心技术、应用场景、挑战与趋势等。这样读者可以更容易理解和查找。每个类别下再细分小类,比如基础概念包括自然语言理解、生成、词嵌入等。 然后,每个概念的描述需要简洁明了,同时提供例子或公式来辅助说明。例如,词嵌入可以用Word2Vec的公式,如$W_{ij} = \text{softmax}(X_i \cdot Y_j)$,这样既专业又直观。还要注意使用正确的LaTeX格式,确保数学表达式正确显示。 用户可能不太清楚如何平衡深度和广度,特别是要涵盖50个概念。可能需要每个概念用一两句话解释,重点突出,避免冗长。同时,引用相关书籍或资源,比如提到的“深度学习”花书,可以增加权威性。 另外,用户提到生成相关问题,所以最后需要设计一些相关问题,帮助读者进一步思考或探索。这些问题应该覆盖博文中的不同部分,比如技术细节、应用案例、挑战等。 还要注意优快云博文的可读性,使用适当的标题、子标题、列表和代码块。比如在讲解TF-IDF时,可以插入一个Python代码示例,展示如何计算TF-IDF值。这不仅能帮助理解,还能让读者动手实践。 考虑到用户可能希望博文被推荐,需要优化SEO,比如在标题和正文中包含关键词,如“自然语言处理基础”、“NLP核心概念”等。此外,结尾部分鼓励互动,比如引导关注、留言讨论,这有助于增加用户粘性。 最后,检查引用部分是否正确,确保每个引用标识对应正确的文献或资源,避免错误。例如,引用Ian Goodfellow的书和斯坦福课程,增加可信度。 总结一下,整个思考过程需要围绕用户的核心需求:结构清晰、内容全面、易于理解、互动性强。分步骤规划博文结构,合理安排内容,使用恰当的技术术语和示例,并优化格式和引用,确保最终博文既专业又易于阅读。</think># 如何撰写自然语言处理领域50个核心概念的优快云博文 ## 一、文章架构设计 1. **开篇引入**(约500字) - 定义自然语言处理(NLP)并说明其重要性,引用人工智能发展现状数据[^1] - 列举NLP典型应用场景:智能客服$Siri$、机器翻译$Google\ Translate$、情感分析$\text{sentiment}(text) \rightarrow \{+1,0,-1\}$ 2. **知识体系图谱**(使用Mermaid流程图) ```mermaid graph TD A[NLP基础] --> B[语言模型] A --> C[词法分析] A --> D[句法分析] E[NLP技术] --> F[词嵌入] E --> G[注意力机制] E --> H[Transformer] ``` ## 二、核心概念组织策略 ### 1. 基础概念模块(15项) - 自然语言理解 vs 生成 - 词向量空间$V \subset \mathbb{R}^{300}$ - TF-IDF计算公式: $$ \text{TF-IDF}(t,d) = \text{tf}(t,d) \times \log\left(\frac{N}{\text{df}(t)}\right) $$ ### 2. 技术实现模块(20项) ```python # 示例:Word2Vec的Skip-gram实现 import gensim model = gensim.models.Word2Vec( sentences, vector_size=100, window=5, min_count=1, sg=1) ``` ### 3. 应用场景模块(10项) - 机器翻译中的BLEU评分: $$ \text{BLEU} = BP \cdot \exp\left(\sum_{n=1}^N w_n \log p_n\right) $$ ### 4. 挑战与趋势模块(5项) - 灾难性遗忘现象:$\mathcal{L}_{\text{total}} = \mathcal{L}_{\text{new}} + \lambda \mathcal{L}_{\text{old}}$ ## 三、写作技巧建议 1. **渐进式讲解**:从词袋模型$\text{BOW}(d) = \{w_1:w_1,...,w_n:w_n\}$讲到BERT的$\text{[CLS]}$向量 2. **视觉辅助**:对比RNN与Transformer的计算复杂度: $$ \text{RNN}: O(n \cdot d^2) \quad \text{Transformer}: O(n^2 \cdot d) $$ 3. **实践指引**:推荐使用Hugging Face库快速部署模型 ```bash pip install transformers ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值