- 博客(45)
- 资源 (10)
- 收藏
- 关注
原创 stanford parser使用
stanford parser是一个可进行短语结构和依存结构分析的parser,网络上的资料很多,而且在stanford nlp的网站上也有很多说明,代码中的readme文件数的也很详细。在这里简要记录一下我学习的一些过程。 stanford parser的源代码下载后可直接使用,不需要做任何修改。训练语料默认是英文的wsj语料。在使用中文训练时需要在参数中指定:训练:使用中文训
2012-07-31 00:42:28 5932 3
原创 berkeley parser使用
最近需要使用到基于短语结构的parser来对句子进行分析,从进入实验室到现在大部分时间都在做parser相关的东西,但是一直都是最基于依存的,现在是第一次基础到基于短语结构的,这次任务需要使用多个短语结构的parser,从网上现在了berkeley parser,学习使用的过程并不是一帆风顺,特在此记下使用方法,以后回顾在看,也希望可以对需要学习的同学有帮助。1、代码处理
2012-07-31 00:27:04 5335
原创 创建和使用分支
1、创建新分支在git中创建分支可以使用git branch child-branch father-branch,该命令从father-branch的末梢创建一个分支,也可以使用git branch new-branch,这个命令是从当前的工作分支的末梢创建一个新的分支。创建新分之后可以使用git checkout name进行分支切换。也可以世界使用git checkout
2012-07-27 11:16:28 1251
原创 git 提交修改
1、交互式提交 git add将工作目录树中的变更提交到暂存区。使用-i参数可以进行交互式提交,选择要暂存的文件或文件的部分内容。特别是patch模式很有用,在patch'模式下,git会显示当前内容与版本库中的内容之间的差别。其中+表示新添加的内容,-表示删除的内容。2、提交修改 提交修改的方式主要有三种:1)使用git add提交到缓存区,然后使用git
2012-07-26 17:13:18 6498
原创 理解和使用分支
1、创建分支 分支是维护项目并行历史记录的方法。在实际应用中,有两种分支比较有用:用来支持项目的不同发布版本的分支和用来只能一个特定功能的开发的分支。 、分支可以为要发布的代码保留一个备份,无需停止正在进行的开发工作。创建分支的命令式git branch child-branch father-branch, child-branch是新分支的名称,
2012-07-26 15:37:36 1172
原创 git 学习笔记
在git中,本地版本库在工作目录树下的.git文件中。 首先需要对git做一些设置,必须设置的是username和email,设置为全局信息。 git config --global user.name “Jim" git config --global user.email "jim@gmail.com" 新建一个工作目录的时候,使用git init命令
2012-07-26 11:09:11 660
转载 求逆序数算法
求逆序数的算法,其实就是归并排序的原理。只需要在排序的过程中记录一下交换得次数。 这种算法其实是一种动态规划的算法。运用了分治策略,将大问题化作一个个小问题。例如将数组a[]分成b[],c[],左右两个部分。逆序数的个数就是左 数组中逆序数的个数和右数组逆序数的个数,然后将两个数组合并的时候,注意一下左边的数组有多少个数比右边的数组的多少数值要大。 #include #i
2012-07-16 08:41:25 3166
转载 No. 34 - String Path in Matrix
No. 34 - String Path in MatrixQuestion: How to implement a function to check whether there is a path for a string in a matrix of characters? It moves to left, right, up and down in a matrix, an
2012-07-14 15:18:42 825
转载 No. 33 - Maximums in Sliding Windows
No. 33 - Maximums in Sliding WindowsQuestion: Given an array of numbers and a sliding window size, how to get the maximal numbers in all sliding windows?For example, if the input array is
2012-07-14 15:18:13 605
转载 No. 32 - Remove Numbers in Array
No. 32 - Remove Numbers in ArrayQuestion: Given an array and a value, how to implement a function to remove all instances of that value in place and return the new length? The order of elements
2012-07-14 15:17:43 544
转载 No. 31 - Binary Search Tree Verification
No. 31 - Binary Search Tree VerificationQuestion: How to verify whether a binary tree is a binary search tree?For example, the tree in Figure 1 is a binary search tree.A node in bi
2012-07-14 15:17:08 662
转载 No. 30 - Median in Stream
No. 30 - Median in StreamQuestion: How to get the median from a stream of numbers at any time? The median is middle value of numbers. If the count of numbers is even, the median is defined as th
2012-07-14 15:16:22 813
转载 No. 29 - Loop in List
No. 29 - Loop in ListQuestion 1: How to check whether there is a loop in a linked list? For example, the list in Figure 1 has a loop.A node in list is defined as the following structure:
2012-07-14 15:15:54 768
转载 No. 28 - A Pair with the Maximal Difference
No. 28 - A Pair with the Maximal DifferenceProblem: A pair contains two numbers, and its second number is on the right side of the first one in an array. The difference of a pair is the minus re
2012-07-14 15:15:19 658
转载 No. 27 - Area of Rectangles
No. 27 - Area of RectanglesProblem: Please implement a function which gets area of a set of rectangles, whose edges are parallel to X-axis or Y-axis.Rectangles are defined as the following:
2012-07-14 15:14:51 2051
转载 No. 26 - Minimal Number of Coins for Change
No. 26 - Minimal Number of Coins for ChangeProblem: Please implement a function which gets the minimal number of coins, whose value is v1, v2, …, vn, to make change for an amount of money with v
2012-07-14 15:14:21 1647
转载 No. 25 - Edit Distance
No. 25 - Edit DistanceProblem: Implement a function which gets the edit distance of two input strings. There are three types of edit operations: insertion, deletion and substitution. Edit distan
2012-07-14 15:13:52 1832
转载 No. 24 - Intersection of Sorted Arrays
No. 24 - Intersection of Sorted Arrays Problem: Please implement a function which getsthe intersection of two sorted arrays. Assuming numbers in each array areunique. For example, ifthe two
2012-07-14 15:11:38 803
转载 No. 23 - Palindrome Numbers
No. 23 - Palindrome Numbers Problem: Please implement a function which checks whether a numberis a palindrome or not. For example, 121 is a palindrome, while 123 is not. Analysis: Many candi
2012-07-14 15:11:08 1498
转载 No. 22 - Turning Number in an Array
No. 22 - Turning Number in an Array Problem: Turning number is the maximum number in an array whichincreases and then decreases. This kind of array is also named unimodal array.Please write a fu
2012-07-14 15:10:44 649
转载 No. 21 - Push and Pop Sequences ofStacks
No. 21 - Push and Pop Sequences ofStacks Problem: Given two integer sequences, one ofwhich is the push sequence of a stack, please check whether the other sequenceis a corresponding pop sequence
2012-07-14 15:10:22 1050
转载 No. 20 - Number of 1 in a Binary
No. 20 - Number of 1 in a BinaryProblem: Please implement a function to get the number of 1s in an integer. For example, the integer 9 is 1001 in binary, so it returns 2 since there are two bits
2012-07-13 19:47:52 1291
转载 No. 19 - Left Rotation of String
No. 19 - Left Rotation of StringProblem: Left rotation of a string is to move some leading characters to its tail. Please implement a function to rotate a string. For example, if the input
2012-07-13 19:47:24 1862
转载 No. 18 - Reverse a Linked List
No. 18 - Reverse a Linked ListProblem: Implement a function to reverse a linked list, and return the head of the reversed list. A list node is defined as below:struct ListNode{ int
2012-07-13 19:46:55 1157
转载 No. 17 - Queue Implemented with Two Stacks
No. 17 - Queue Implemented with Two StacksProblem: Implement a queue with two stacks. The class for queues is declared in C++ as below. Please implement two functions: appendTail to append an el
2012-07-13 19:46:25 691
转载 No. 16 - Maximal Length of Incremental Subsequences
No. 16 - Maximal Length of Incremental SubsequencesProblem: Given an unsorted array, find the max length of subsequence in which the numbers are in incremental order.For example: If the in
2012-07-13 19:45:53 624
转载 No. 15 - Fibonacci Sequences
No. 15 - Fibonacci SequencesProblem: Please implement a function which returns the nth number in Fibonacci sequences with an input n. Fibonacci sequence is defined as:Analysis: It is
2012-07-13 19:45:19 904
转载 No. 14 - Last Number in a Circle
No. 14 - Last Number in a CircleProblem: If we delete the mth number from a circle which is composed of numbers 0, 1, …, n-1 counting from 0 at every time, what is the last number?For exam
2012-07-13 19:44:40 618
转载 No. 13 - First Character Appearing Only Once
No. 13 - First Character Appearing Only OnceProblem: Implement a function to find the first character in a string which only appears once.For example: It returns ‘b’ when the input is “abaccde
2012-07-13 19:44:09 661
转载 No. 12 - Mirror of Binary Trees
No. 12 - Mirror of Binary TreesProblem: Please implement a function which returns mirror of a binary tree.Binary tree nodes are defined as:struct BinaryTreeNode{ int
2012-07-13 19:43:44 726
转载 No. 11 - Print Binary Trees from Top to Bottom
No. 11 - Print Binary Trees from Top to BottomProblem: Please print a binary tree from its top level to bottom level, and print nodes from left to right if they are in same level. For exam
2012-07-13 19:43:12 760
转载 No. 10 - K-th Node from End
No. 10 - K-th Node from EndProblem: Get the Kth node from end of a linked list. It counts from 1 here, so the 1st node from end is the tail of list. For instance, given a linked list with
2012-07-13 19:42:49 1272
转载 No. 09 - Numbers with a Given Sum
No. 09 - Numbers with a Given SumProblem 1: Given an increasingly sorted array and a number s, please find two numbers whose sum is s. If there are multiple pairs with sum s, just output any one
2012-07-13 19:42:23 611
转载 No. 08 - Calculate 1+2+…+n
No. 08 - Calculate 1+2+…+nProblem: Calculate 1+2+…+n without multiplication, division, key words for, while, if, else,switch, case, as well as conditional operator (A ? B : C).Analysis: Th
2012-07-13 19:41:46 1455
转载 No. 07 - Reverse words in a sentence
No. 07 - Reverse words in a sentenceProblem: Reverse the order of words in a sentence, but keep words themselves unchanged. Words in a sentence are divided by blanks. For instance, the reversed
2012-07-13 19:41:10 977
转载 No. 06 - Post-order Traversal Sequences of Binary Search Trees
No. 06 - Post-order Traversal Sequences of Binary Search TreesProblem: Determine whether an input array is a post-order traversal sequence of a binary tree or not. If it is, return true; otherwi
2012-07-13 19:40:40 693
转载 No. 05 - The Least k Numbers
No. 05 - The Least k NumbersQuestion: Please find out the least k numbers out of n numbers. For example, if given the 8 numbers 4, 5, 1, 6, 2, 7, 3 and 8, please return the least 4 numbers 1, 2,
2012-07-13 19:40:12 1139
转载 No. 04 - Paths with Specified Sum in Binary Tree
No. 04 - Paths with Specified Sum in Binary TreeQuestion: All nodes along children pointers from root to leaf nodes form a path in a binary tree. Given a binary tree and a number, please print o
2012-07-13 19:39:40 743
转载 No. 03 - Maximum Sum of All Sub-arrays
No. 03 - Maximum Sum of All Sub-arraysQuestion: A sub-array has one number of some continuous numbers. Given an integer array with positive numbers and negative numbers, get the maximum sum of a
2012-07-13 19:39:07 742
转载 No. 02 - Stack with Function min()
No. 02 - Stack with Function min()Problem: Define a stack, in which we can get its minimum number with a function min. In this stack, the time complexity of min(), push() and pop() are all O(1).
2012-07-13 19:38:24 603
Support Vector Machines vs Logistic Regression
2016-10-23
Machine Learning in Action 完整高清版本 英文版本教程
2012-10-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人