欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

学习如何安装和使用NLTK工具——NLP的必备

最编程 2023-12-26 17:44:35
...

【官网】Natural Language Toolkit — NLTK 3.4.4 documentation
【github】NLTK Source

NLTK最初成立于2001年,是宾夕法尼亚大学计算机与信息科学系计算语言学课程的一部分。从那时起,它已经在数十个贡献者的帮助下得到了发展和扩展。它现已在数十所大学的课程中采用,并作为许多研究项目的基础。

NLTK(Natural Language Toolkit)是构建Python程序以使用人类语言数据的领先平台。它为50多种语料库和词汇资源(如WordNet)提供了易于使用的界面,还提供了一套用于分类,标记化,词干化,标记,解析和语义推理的文本处理库,用于工业级NLP库的包装器。

NLTK适用于语言学家,工程师,学生,教育工作者,研究人员和行业用户等。NLTK适用于Windows,Mac OS X和Linux。最重要的是,NLTK是一个免费的,开源的,社区驱动的项目。

NLTK被称为“使用Python进行教学和计算语言学工作的绝佳工具”,以及“用自然语言进行游戏的神奇图书馆”。

语言处理任务和相应的NLTK模块以及功能示例:

语言处理任务 NLTK 模块 功能
Accessing corpora corpus standardized interfaces to corpora and lexicons
String processing tokenize, stem tokenizers, sentence tokenizers, stemmers
Collocation discovery collocations t-test, chi-squared, point-wise mutual information
Part-of-speech tagging tag n-gram, backoff, Brill, HMM, TnT
Machine learning classify, cluster, tbl decision tree, maximum entropy, naive Bayes, EM, k-means
Chunking chunk regular expression, n-gram, named-entity
Parsing parse, ccg chart, feature-based, unification, probabilistic, dependency
Semantic interpretation sem, inference lambda calculus, first-order logic, model checking
Evaluation metrics metrics precision, recall, agreement coefficients
Probability and estimation probability frequency distributions, smoothed probability distributions
Applications app, chat graphical concordancer, parsers, WordNet browser, chatbots
Linguistic fieldwork toolbox manipulate data in SIL Toolbox format

NLTK设计目标:

  • 简单性
  • 一致性
  • 可扩展性
  • 模块化

推荐阅读