import nltk from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer #预处理 def preprocessing(text): tokens=[word for sent in nltk.sent... ...
分类:
其他好文 时间:
2018-12-06 11:05:02
阅读次数:
174
小白最近在看文献时总是碰到一个奇怪的词叫“homography matrix”,查看了翻译,一般都称作“单应矩阵”,更迷糊了。正所谓:“每个字都认识,连在一块却不认识”就是小白的内心独白。查了一下书上的推导,总感觉有种“硬凑”的意味,于是又找到了师兄。。。 神奇的单应矩阵小白:师兄~单应矩阵是什么鬼 ...
分类:
其他好文 时间:
2018-12-05 22:28:43
阅读次数:
282
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use extra sp ...
分类:
其他好文 时间:
2018-12-05 10:24:42
阅读次数:
216
from sklearn.metrics import confusion_matrix, classification_report from sklearn.naive_bayes import MultinomialNB import csv file_path=r'F:\duym\ai\sm... ...
分类:
其他好文 时间:
2018-12-04 22:36:43
阅读次数:
235
1 package com.kehou.print; 2 3 /** 4 * 父类:打印机类 5 * @author 6 * 7 */ 8 public abstract class Printer { 9 public abstract void print(); 10 } 1 package c... ...
分类:
其他好文 时间:
2018-12-04 22:29:36
阅读次数:
169
题目传送门 题目大意: 二维平面上有q次操作,每次操作可以是添加一个点,也可以是添加一个矩形,问每次操作后,有多少 点-矩形 这样的pair,pair的条件是点被矩形覆盖(边缘覆盖也算)。 思路: cdq分治,由于加点和加矩形都既是修改操作又是查询操作,而且两种方式完全不一样,所以用两部分cdq来写 ...
分类:
其他好文 时间:
2018-12-04 19:00:25
阅读次数:
189
563. Binary Tree Tilt 566. Reshape the Matrix 572. Subtree of Another Tree 581. Shortest Unsorted Continuous Subarray ...
分类:
其他好文 时间:
2018-12-04 10:12:53
阅读次数:
175
题目传送门 题目大意: 给出2^k大小的白色矩形,q次操作,每次将一行或者一列颜色反转,问总体矩阵的价值,矩阵的价值定义是,如果整个矩阵颜色相同,价值为1,否则就把这个矩阵切成四份,价值为四个小矩阵的总价值加一。 思路: 结论是,ans=不同色的子矩阵数*4+1,用数学归纳法证明。具体看 大佬的博客 ...
分类:
其他好文 时间:
2018-12-03 00:45:51
阅读次数:
230
题目描述 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下4 X 4矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10. 思路: 模拟题,划 ...
分类:
其他好文 时间:
2018-12-02 16:49:19
阅读次数:
185
Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each operation is repres ...
分类:
编程语言 时间:
2018-12-02 14:29:12
阅读次数:
206