NLP之路-一点小语言工具函数
来源:互联网 发布:淘宝企业店铺登陆 编辑:程序博客网 时间:2024/05/27 21:01
统计工具
#coding=utf-8def lexical_diversity(my_text_data):word_count=len(my_text_data)vocal_size=len(set(my_text_data))diversity_score=word_count/vocal_sizereturn diversity_scoremy_text_data="The problem of nearest neighbor search is one of major importance in a variety of applications such as image recognition, data compression, pattern recognition and classi?cation, machine learning, document retrieval systems, statistics and data analysis. However, solving this problem in high dimensional spaces seems to be a very di?cult task and there is no algorithm that performs signi?cantly better than the standard brute-force search. This has lead to an increasing interest in a class of algorithms that perform approximate nearest neighbor searches, which have proven to be a good-enough approximation in most practical applications and in most cases, orders of magnitude faster that the algorithms performing the exact searches"print len(my_text_data)print len(set(my_text_data))print lexical_diversity(my_text_data)
0 0
- NLP之路-一点小语言工具函数
- NLP之路-Deep Learning in NLP (一)词向量和语言模型
- NLP-python自然语言工具之nltk
- NLP工具
- C语言之小函数调戏软件
- Go语言小知识之append()函数
- NLP之路-python爬虫
- NLP之路-语言学网络资源
- NLP之路-warm up
- NLP之路-Dataset大全
- NLP之路-Deep Learning for NLP 文章列举
- coursera NLP学习笔记之week2 语言模型
- 工具小函数集合
- 工具小函数汇总
- 小函数工具库
- NLP工具集
- 开源NLP工具
- Python NLP相关工具
- POJ 1584--A Round Peg in a Ground Hole
- 建了个QQ群 有问题可i以一起讨论
- View类常用属性及方法
- 硅谷创业教父保罗·格雷厄姆给小白的创业建议书
- PbModel(背景建模)
- NLP之路-一点小语言工具函数
- 利用POI操作不同版本word文档中的图片以及创建word文档
- HDU 2546- 饭卡(01背包)
- C# 中的委托和事件
- Android Socket Example
- 黑马程序员----判断一个字符串是否是对称字符串
- 程序员的思维修炼-读书笔记-思维导图
- matlab连接sqlite方法
- PBAS(背景建模)