Study of Python.
摘要:利用 sklearn.feature_extraction.text 中的 CountVectorizer 来实现 首先获取所有的文本信息 然后将文本信息转化为从 0 开始的数字 获取转换后的字符向量 参见如下代码: >>> text_01 = "My name is Alex Lee." >>>
阅读全文
摘要:参考:Word2Vec Tutorial - The Skip-Gram Model 参考:Word2Vec Tutorial Part 2 - Negative Sampling 参考:通俗理解word2vec 参考:word2vec 中的数学原理详解 参考:一文搞懂word embeddding
阅读全文
摘要:repr() 函数可以将对象转为 string 类型。 主要用于 NLP 处理,里面存在一些常量列表,包括数字、字母、大写字母、小写字母、标点符号、空格等。 参考:6.1. string — Common string operations 可以用于删除文本中的标点符号,将标点符号 replace
阅读全文
摘要:参考:pandas筛选出表中满足另一个表所有条件的数据 参考:pandas:匹配两个dataframe 使用 pd.merge 来实现 on 表示查询的 columns,如果都有 id,那么这是很好的区别项,找到 id 相同的进行merge。
阅读全文
摘要:参考:Python3 Print 同一行打印显示进度条效果 参考:\r\n, \r and \n what is the difference between them? [duplicate] 参考:python的print格式化输出,以及使用format来控制。 实现思路就是不停地删除之前打印的
阅读全文
摘要:save data in csv file.
阅读全文
摘要:一、两个经纬度点之间的距离 $\phi_1$,$\phi_2$是纬度,$\lambda_1$,$\lambda_2$是经度。均是弧度制数值 ArcGIS Python 实现 python 实现: 二、经纬度网格的面积计算 $\phi_1$,$\phi_2$是纬度,$\lambda_1$,$\lamb
阅读全文
摘要:ref: Markdown基本语法 ref: Markdown Guide ref: Markdown Cheatsheet ref: Markdown Tutorial Lists Basic Syntax The Markdown elements are outlined in John Gr
阅读全文
摘要:ABS suburbs data of AUS 1. Dissolve Merge polygons with the same attribute of "SA2_NAME16". 2. Add Centroid XY After using the "Add Geometry Attribute
阅读全文
摘要:【Question 01】 When converting Tweets info to csv file, commas in the middle of data (i.e. location: Sydney, NSW) can make a mistake of the csv file (c
阅读全文
摘要:Ref: json -- JSON encoder and decoder JSON(JavaScript Object Notation) can help us to see data more intuitive. Example: import json >>> a = {"hobbies"
阅读全文
摘要:参考:Tweet Object 参考:Geo Objects 参考:User Object Ref: Place data dictionary Tweet Object Array ofArray ofArray ofFloat User Object Place data dictionary
阅读全文
摘要:参数说明: coordinates:Represents the geographic location of this Tweet as reported by the user or client application. The inner coordinates array is forma
阅读全文
摘要:1. 读取文件,计算 tweets 数目 python中readline判断文件读取结束的方法 line == '' python:如何检查一行是否为空行 line == '\n' or line == '\r\n' line == '' line == '\n' or line == '\r\n'
阅读全文