- 博客(7)
- 收藏
- 关注
原创 Python+CRF处理2014年人民日报语料库
#-*-coding:utf-8-*-"""author: Leodate: 2017-4-23"""# Chinese Characters: B(Begin),E(End),M(Middle),S(Single)from __future__ import unicode_literals # compatible with python3 unicodeimport cod
2017-06-27 10:44:26
4009
原创 python处理人民日报语料库
# encoding: utf-8"""author: Leodate: 2017-6-27"""from __future__ import unicode_literals # compatible with python3 unicodeimport codecsimport sysfrom sys import argvdef character_tagging(
2017-06-27 10:40:26
4059
原创 柏老师python笔记(四)
# encoding: utf-8"""author: Leodate: 2017-6-21"""# 函数的使用# 参数的收集(Python)使用这种方法解决参数个数不确定性# *arg返回的是一个元祖的类型,如果不给*arg传值的话那么他就是一个空的元祖def func(x, *arg): print x result = x
2017-06-22 18:59:17
227
原创 柏老师Python笔记(三)
# encoding: utf-8"""author: Leodate: 2017-6-15"""import randomfrom math import sqrtimport osimport fileinputls_line = ['hello', 'I am jinjiao', 'Welcome you', '']for word in ls
2017-06-22 18:58:17
409
原创 柏老师python笔记(二)
# encoding: utf-8"""author: Leodate: 2017-6-2"""import copylang = 'python'print(lang.index('y'))lst = ['python', 'java', 'c++']print(lst.index('java'))print(lst[-1: -3]
2017-06-22 18:56:53
241
原创 柏老师Python学习笔记(一)
# encoding: utf-8"""author: Leodate: 2017-6-2"""import copylang = 'python'print(lang.index('y'))lst = ['python', 'java', 'c++']print(lst.index('java'))print(lst[-1: -3])print(lst[-3: -1
2017-06-16 11:20:45
614
原创 Python学习中常常遇到的一些问题
### 1. Python中的replace方法的使用for line in open('要打开的文件名', 'r'): # 以特有的编码打开文件 rs = line.replace('\n', '') # 替换换行符
2017-06-15 14:38:05
445
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人